You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/07/14 02:18:40 UTC

[GitHub] [trafficcontrol] zrhoffman opened a new issue, #6963: `POST /api/3.1/servers` cannot set `updPending`

zrhoffman opened a new issue, #6963:
URL: https://github.com/apache/trafficcontrol/issues/6963

   <!--
   ************ STOP!! ************
   If this issue identifies a security vulnerability, DO NOT submit it! Instead, contact
   the Apache Traffic Control Security Team at security@trafficcontrol.apache.org and follow the
   guidelines at https://apache.org/security regarding vulnerability disclosure.
   
   - For *SUPPORT QUESTIONS*, use the #traffic-control channel on the ASF slack (https://s.apache.org/tc-slack-request)
   or the Traffic Control Users mailing list (send an email to users-subscribe@trafficcontrol.apache.org to subscribe).
   - Before submitting, please **SEARCH GITHUB** for a similar issue or PR
       * https://github.com/apache/trafficcontrol/issues
       * https://github.com/apache/trafficcontrol/pulls
   -->
   
   <!-- Do not submit security vulnerabilities or support requests here - see above -->
   ## This Bug Report affects these Traffic Control components:
   <!-- delete all those that don't apply -->
   - Traffic Ops
   
   ## Current behavior:
   <!-- Describe how the bug happens -->
   In Traffic Ops API v3, you used to be able to include
   ```json
     "revalPending": false,
   ```
   or
   ```json
     "updPending": true,
   ```
   
   in the body of `POST /servers` or `PUT /servers` to queue updates. As of #6569, however, the `server.reval_pending` and `server.upd_pending` fields do not exist, and including those fields in the `POST` or `PUT` body does not have any effect.
   
   Since this is undocumented behavior, it is not necessarily a bug. That said, for anyone depending on that behavior in stable TO API version 3, this is a breaking change.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] mitchell852 commented on issue #6963: `POST /api/3.1/servers` does not set `updPending`

Posted by GitBox <gi...@apache.org>.
mitchell852 commented on issue #6963:
URL: https://github.com/apache/trafficcontrol/issues/6963#issuecomment-1253817831

   so is this works as expected or needs to be fixed? @zrhoffman 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] jhg03a commented on issue #6963: `POST /api/3.1/servers` does not set `updPending`

Posted by GitBox <gi...@apache.org>.
jhg03a commented on issue #6963:
URL: https://github.com/apache/trafficcontrol/issues/6963#issuecomment-1184554909

   If our input/output objects didn't have to be the same because of CRUD, I'd recommend pulling immutable fields out of modifying object inputs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] zrhoffman commented on issue #6963: `POST /api/3.1/servers` does not set `updPending`

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #6963:
URL: https://github.com/apache/trafficcontrol/issues/6963#issuecomment-1184802860

   At a cachegroup, cdn, or topology level, sure. I just meant at a server level


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] zrhoffman commented on issue #6963: `POST /api/3.1/servers` does not set `updPending`

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #6963:
URL: https://github.com/apache/trafficcontrol/issues/6963#issuecomment-1184797526

   Using `/api/3.1/servers/{{ID}}` would make sense if it had `PATCH` support. Without that, If t3c queued updates using `PUT /api/3.1/servers/{{ID}}`, it re-introduces the race condition that #6569 sought to fix (which is why API v4 does not support it).
   
   So if we reintroduce this functionality in API v3, the docs should include a note like "This is deprecated, `PUT /servers{{ID}}/status` is the recommended way to do it"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ocket8888 commented on issue #6963: `POST /api/3.1/servers` does not set `updPending`

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #6963:
URL: https://github.com/apache/trafficcontrol/issues/6963#issuecomment-1184770960

   I made that note a long, long time ago - it's much easier when you're learning to use an API to remember how to use one endpoint than it is to remember what second endpoint you need to use to modify some specific field of responses from that first endpoint. That's why the note is there, but that's probably not really a good enough reason for it to exist. Regardless, though, it's there.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] rawlinp commented on issue #6963: `POST /api/3.1/servers` does not set `updPending`

Posted by GitBox <gi...@apache.org>.
rawlinp commented on issue #6963:
URL: https://github.com/apache/trafficcontrol/issues/6963#issuecomment-1184542493

   I don't necessarily agree with this note in the docs:
   > In the vast majority of cases, it is advisable that the PUT method of the [servers/{{ID}}](https://traffic-control-cdn.readthedocs.io/en/latest/api/v3/servers_id.html#to-api-v3-servers-id) endpoint be used instead.
   
   IMO queueing updates should be its own separate action -- being able to create a server in TO with updates already queued does not really buy us much. And for updates, it makes sense to queue updates separately without having to include all the unrelated server fields, because it's way more common to queue updates on a server than it is to actually change fields of a server.
   
   So, while this is technically a regression, I actually think it's better this way. Just my 2 cents.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ocket8888 commented on issue #6963: `POST /api/3.1/servers` does not set `updPending`

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #6963:
URL: https://github.com/apache/trafficcontrol/issues/6963#issuecomment-1184800547

   `s/\/status/\/update/g`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] ocket8888 commented on issue #6963: `POST /api/3.1/servers` does not set `updPending`

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #6963:
URL: https://github.com/apache/trafficcontrol/issues/6963#issuecomment-1183969829

   > ... this is undocumented behavior, ...
   
   [The "Request Structure" section of the `PUT /servers/{{ID}}` documentation](https://traffic-control-cdn.readthedocs.io/en/latest/api/v3/servers_id.html#request-structure) lists `updPending` as a valid payload property, making no mention of it being immutable (because it isn't supposed to be), and in fact [the documentation for `/servers/{{ID}}/queue_update`](https://traffic-control-cdn.readthedocs.io/en/latest/api/v3/servers_id_queue_update.html#servers-id-queue-update) recommend using that method instead. So I'd say it's far from undocumented behavior.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] zrhoffman commented on issue #6963: `POST /api/3.1/servers` does not set `updPending`

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #6963:
URL: https://github.com/apache/trafficcontrol/issues/6963#issuecomment-1184803586

   Oh, server has it also


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficcontrol] zrhoffman commented on issue #6963: `POST /api/3.1/servers` does not set `updPending`

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #6963:
URL: https://github.com/apache/trafficcontrol/issues/6963#issuecomment-1253825778

   @mitchell852 It does not work as expected but only affects API version 3. We're sort of waiting for API version 3 to go away to close the issue


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org