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 2020/11/09 15:54:16 UTC

[GitHub] [trafficcontrol] dmohan001c opened a new issue #5263: Adding Jobs test cases

dmohan001c opened a new issue #5263:
URL: https://github.com/apache/trafficcontrol/issues/5263


   <!--
   ************ 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://www.apache.org/security/ regarding vulnerability disclosure.
   
   - For *SUPPORT QUESTIONS*, use the Traffic Control slack (https://s.apache.org/atc-slack)
   or Traffic Control mailing lists (https://trafficcontrol.apache.org/mailing_lists).
   - Before submitting, please **SEARCH GITHUB** for a similar issue or PR.
   -->
   
   ## I'm submitting a ...
   <!-- delete all those that don't apply -->
   <!--- security vulnerability (STOP!! - see above)-->
   -  bug report
   <!--(Please do not submit support requests here - see above)-->
   
   ## Traffic Control components affected ...
   <!-- delete all those that don't apply -->
   -  CDN in a Box
   -  Documentation
   -  Traffic Ops
   -  Traffic Portal
   -  CI tests
   
   ## Current behavior:
   <!-- Describe how the bug manifests -->
   POST: https://tp.nightly.cdnlab.comcast.net/api/3.0/jobs
   {
   	"deliveryService":		"testds1112",
   	"assetUrl": 			"http://abc.test/.*"
   	"startTime": 			"2021-10-09 03:52:11",
   	"regex": 				"/.*",
   	"ttl":           		"121m",
   }
   Response:
   {
       "alerts": [
           {
               "text": "Invalidation request created for http://abc.test/.*, start:2021-10-09 03:52:11 +0000 UTC end 2021-10-09 05:52:11 +0000 UTC",
               "level": "success"
           }
       ],
   }
   
   ## Expected behavior:
   <!-- Describe what the behavior would be without the bug -->
   As per the documentation,
   These durations can be combined e.g. 2h45m specifies a TTL of two hours and forty-five minutes - however note that durations are always rounded up to the nearest hour so that e.g. 121m becomes three hours.
   
   As per the documentation, the hour should be rounded to the next hour. 121m should round to the next hour(3) the end time should be 2021-10-09 06:52:11. But it rounds to the previous hour. (2) and the end time is 2021-10-09 05:52:11
   
   
   <!--
   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
   
       https://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.

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



[GitHub] [trafficcontrol] dmohan001c commented on issue #5263: ttl time reflecting incorrectly in Jobs creation(rounds to previous hour instead of next hour)

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


   > @dmohan001c - isn't 2021-10-09 03:52:11 + 121m = 2021-10-09 05:53:11? not 2021-10-09 06:52:11 as you mentioned?
   
   whatever @ocket8888  told is correct
   


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

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



[GitHub] [trafficcontrol] mitchell852 commented on issue #5263: ttl time reflecting incorrectly in Jobs creation(rounds to previous hour instead of next hour)

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


   I see. ORT can only handle TTL in hours, therefore it is converted to hours. Did not know that....


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

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



[GitHub] [trafficcontrol] ocket8888 commented on issue #5263: ttl time reflecting incorrectly in Jobs creation(rounds to previous hour instead of next hour)

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


   TTL is in hours only. Currently, he's saying 2021-10-09 03:52:11 + 121m = 2021-10-09 05:53:11 gets rounded down to 2021-10-09 05:52:11 but the docs say it should be rounding up, which would result in 2021-10-09 06:52:11


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

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



[GitHub] [trafficcontrol] mitchell852 commented on issue #5263: ttl time reflecting incorrectly in Jobs creation(rounds to previous hour instead of next hour)

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


   @dmohan001c - isn't 2021-10-09 03:52:11 + 121m = 2021-10-09 05:53:11?  not 2021-10-09 06:52:11 as you mentioned?


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

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



[GitHub] [trafficcontrol] mitchell852 commented on issue #5263: ttl time reflecting incorrectly in Jobs creation(rounds to previous hour instead of next hour)

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


   I guess the current workaround is to define TTL in hours, not minutes and not hours and minutes....


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

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