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 2021/11/03 21:26:10 UTC

[GitHub] [trafficcontrol] TaylorCFrey opened a new pull request #6328: Fix json response for invalid invalidation job. Moved CHANGELOG entry

TaylorCFrey opened a new pull request #6328:
URL: https://github.com/apache/trafficcontrol/pull/6328


   <!--
   Thank you for contributing! Please be sure to read our contribution guidelines: https://github.com/apache/trafficcontrol/blob/master/CONTRIBUTING.md
   If this closes or relates to an existing issue, please reference it using one of the following:
   
   Closes: #ISSUE
   Related: #ISSUE
   
   If this PR fixes a security vulnerability, DO NOT submit! 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.
   -->
   
   Addresses an issue discovered in testing the TO v4.0 `/jobs` endpoint. The validation of the incoming job was wrapping the alert and error response inside another alert and error response.
   
   Incorrect response:
   ```json
   {
     "alerts": [
       {
         "text": "{\"alerts\":[{\"text\":\"deliveryService: cannot be blank.\",\"level\":\"error\"}]}\n",
         "level": "error"
       }
     ]
   }
   ```
   
   Fixed response:
   ```json
   {
     "alerts": [
       {
         "text": "deliveryService: cannot be blank.",
         "level": "error"
       }
     ]
   }
   ```
   
   Also moved a CHANGELOG entry for the _REFETCH_ feature into the correct location for the CHANGELOG.
   
   <!-- **^ Add meaningful description above** --><hr>
   
   ## Which Traffic Control components are affected by this PR?
   <!-- Please delete all components from this list that are NOT affected by this PR.
   Feel free to add the name of a tool or script that is affected but not on the list.
   -->
   - Traffic Ops
   
   ## What is the best way to verify this PR?
   <!-- Please include here ALL the steps necessary to test your PR.
   If your PR has tests (and most should), provide the steps needed to run the tests.
   If not, please provide step-by-step instructions to test the PR manually and explain why your PR does not need tests. -->
   
   Run Traffic Ops and attempt to *POST* a new invalidation request to the `/jobs` endpoint. The following json will trigger a validation error, alert response:
   ```json
   {
   	"startTime": "2021-11-05T16:24:00.370Z",
   	"regex": "/path/to/some/content\\.jpg",
   	"ttlHours": 24,
   	"invalidationType": "REFRESH"
   }
   ```
   
   ## PR submission checklist
   - [ ] This PR has tests - Does not have a functional aspect, only asthetic.
   - [ ] This PR has documentation - No documented logic is changed, added, or deleted.
   - [x] This PR has a CHANGELOG.md entry 
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://apache.org/security) for details)
   
   <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
   -->
   


-- 
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] mattjackson220 merged pull request #6328: Fix json response for invalid invalidation job. Moved CHANGELOG entry

Posted by GitBox <gi...@apache.org>.
mattjackson220 merged pull request #6328:
URL: https://github.com/apache/trafficcontrol/pull/6328


   


-- 
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 pull request #6328: Fix json response for invalid invalidation job. Moved CHANGELOG entry

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #6328:
URL: https://github.com/apache/trafficcontrol/pull/6328#issuecomment-960348242


   > retest this please
   
   Failing due to the ATS RPM version-calculating issue fixed by #6329


-- 
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 pull request #6328: Fix json response for invalid invalidation job. Moved CHANGELOG entry

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #6328:
URL: https://github.com/apache/trafficcontrol/pull/6328#issuecomment-960128967






-- 
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 pull request #6328: Fix json response for invalid invalidation job. Moved CHANGELOG entry

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #6328:
URL: https://github.com/apache/trafficcontrol/pull/6328#issuecomment-961237782


   In order for CI to pass, #6328 needs to be rebased onto the [`apache:master`](https://github.com/apache/trafficcontrol/commits/master) branch now that the CI fix in apache/trafficcontrol#6329 is merged:
   ```shell
   git remote add apache git@github.com:apache/trafficcontrol.git
   git fetch apache
   git rebase apache
   git push your-fork your-branch --force
   ```


-- 
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] mattjackson220 merged pull request #6328: Fix json response for invalid invalidation job. Moved CHANGELOG entry

Posted by GitBox <gi...@apache.org>.
mattjackson220 merged pull request #6328:
URL: https://github.com/apache/trafficcontrol/pull/6328


   


-- 
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 pull request #6328: Fix json response for invalid invalidation job. Moved CHANGELOG entry

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #6328:
URL: https://github.com/apache/trafficcontrol/pull/6328#issuecomment-960128967






-- 
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] dneuman64 commented on pull request #6328: Fix json response for invalid invalidation job. Moved CHANGELOG entry

Posted by GitBox <gi...@apache.org>.
dneuman64 commented on pull request #6328:
URL: https://github.com/apache/trafficcontrol/pull/6328#issuecomment-960245548


   retest this please


-- 
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 pull request #6328: Fix json response for invalid invalidation job. Moved CHANGELOG entry

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #6328:
URL: https://github.com/apache/trafficcontrol/pull/6328#issuecomment-960128967


   > Also moved a CHANGELOG entry for the _REFETCH_ feature into the correct location for the CHANGELOG.
   
   If you put that in a separate PR, I'll merge it right away


-- 
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] dneuman64 commented on pull request #6328: Fix json response for invalid invalidation job. Moved CHANGELOG entry

Posted by GitBox <gi...@apache.org>.
dneuman64 commented on pull request #6328:
URL: https://github.com/apache/trafficcontrol/pull/6328#issuecomment-960245548






-- 
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] dneuman64 commented on pull request #6328: Fix json response for invalid invalidation job. Moved CHANGELOG entry

Posted by GitBox <gi...@apache.org>.
dneuman64 commented on pull request #6328:
URL: https://github.com/apache/trafficcontrol/pull/6328#issuecomment-960245548


   retest this please


-- 
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 pull request #6328: Fix json response for invalid invalidation job. Moved CHANGELOG entry

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #6328:
URL: https://github.com/apache/trafficcontrol/pull/6328#issuecomment-961237782


   In order for CI to pass, #6328 needs to be rebased onto the [`apache:master`](https://github.com/apache/trafficcontrol/commits/master) branch now that the CI fix in apache/trafficcontrol#6329 is merged:
   ```shell
   git remote add apache git@github.com:apache/trafficcontrol.git
   git fetch apache
   git rebase apache
   git push your-fork your-branch --force
   ```


-- 
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] mattjackson220 merged pull request #6328: Fix json response for invalid invalidation job. Moved CHANGELOG entry

Posted by GitBox <gi...@apache.org>.
mattjackson220 merged pull request #6328:
URL: https://github.com/apache/trafficcontrol/pull/6328


   


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