-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add asn field to server #7023
Add asn field to server #7023
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a build failure/warning in the docs on master (it's recoverable which is why the action reports a success), so I'm tryna put some extra effort into checking out the docs of things that I otherwise don't look at to prevent stuff like that from slipping through again. I don't intend to review the rest of the code.
@@ -155,6 +155,11 @@ var TableServersController = function(tableName, servers, filter, $scope, $state | |||
field: "offlineReason", | |||
hide: true | |||
}, | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM. Verified that one can see asn field only in 4.1 /servers
API (GET) route and all other REST API calls for /servers
work fine. asn
used as query param in 4.1 GET servers
also gives the correct response.
The asn
column is now seen in TP as a list if a cachegroup has more than one asn assigned to it.
Unit tests and Integration tests (v3/v4) pass successfully on local.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ServerV4
type alias in lib/go-tc/servers.go
still says that the latest version of a server is ServerV40
. This means that other API endpoints that show servers - e.g. /deliveryservices/{{ID}}/servers/eligible
etc. - all now have different representations of a server than /servers
. This is, in my opinion, bad. An API object should have exactly one representation.
I've updated the |
IDK why the |
fb521f2
to
9e85768
Compare
That's because #6960 was erroneously merged with a go fmt failure. |
A fix is now open #7038 |
This will be addressed in a follow up PR. |
47ede74
to
21e1d71
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs look good now, and all actions pass
* Adding ASN to Server struct * doc changes * fix typo * add godoc * address code review comments * address code review changes * address code review comments * remove extra doc line
This PR is not related to any issue. It adds the
ASN
field to the server struct, so that users can useasn
as a query param toGET
servers.Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Run TO and TP locally.
Hit the
4.1 GET /servers
route and make sure that theasns
field shows up in the response.Hit the same endpoint and add
asn=<>
as a query param.Make sure you see the correct servers in the response.
Make sure the other routes DO NOT return this new field.
Make sure all other CRUD routes for servers work fine.
Test TP to verify that you can show/ hide the new field in servers.
If this is a bugfix, which Traffic Control versions contained the bug?
PR submission checklist