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/02/10 00:41:58 UTC

[GitHub] [trafficcontrol] ericholguin commented on pull request #6552: Validate type in topology using current cache group name

ericholguin commented on pull request #6552:
URL: https://github.com/apache/trafficcontrol/pull/6552#issuecomment-1034361900


   This change will only fix the issue for Traffic Portal. The code performs a check against the requested body, so if in the request body there is a change to the name, the validation will perform a query against that new name and will not find that newly named cache group in any topology, hence allowing it to update and succeed. Changing the code to use the previous or current name, fixes this, as it will find the topology relationship.
   
   However, in Traffic Ops, the type can be changed regardless of the name or any other field changes, if there is no id field in the request body. This is because the validation uses the cache group id in the query to get previous type and now this newly added query for previous name. The way validation is structured, is that it will only use the requested body, and in the case of this endpoint id is in the url path. If the user omits the id, the validation will be querying using an empty id value resulting in no real validation being made.
   
   Not sure what the fix is, without changing the Validate functionality. Or unless id is required in the request body when updating a cache group.


-- 
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