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/03/29 21:34:57 UTC

[GitHub] [trafficcontrol] ocket8888 opened a new issue #5690: GHA DB tests fail if you modify the migration after creation in the same PR

ocket8888 opened a new issue #5690:
URL: https://github.com/apache/trafficcontrol/issues/5690


   ## I'm submitting a ...
   -  bug report
   
   ## Traffic Control components affected ...
   -  CI tests
   
   ## Current behavior:
   If a migration is edited in the same PR that creates it, the CI action for the database migrations will report that it is out of order, even when it isn't. 
   
   ## Expected behavior:
   The tests should account for the possibility that a migration may be edited before being merged, and test accordingly.
   
   ## Minimal reproduction of the problem with instructions:
   My PR #5678 displays this behavior. This is because - I think - the test script assumes that `git --no-pager log --format=%ct 2021032600000000_dsrs_originals.sql` is going to output one line, the time of creation of the migration. It then adds this to an array, and later compares it against the latest modification time of any migration using `git log -1 --name-status --format="%ct" . | head -n 1` with `!=`. So essentially it's comparing
   ```bash
   mtime_array+=( "$(git --no-pager log --format=%ct 2021032600000000_dsrs_originals.sql)" )
   mtime_length=${#mtime_array[@]}
   echo ${mtime_array[$mtime_length-1]}
   # Outputs: 1617049981 1616777950
   ```
   to
   ```bash
   git log -1 --name-status --format="%ct" . | head -n 1
   # Outputs: 1617049981
   ```
   Which you can see is lining up with _part_ of the `mtime_array` entry, but will never be exactly equal because the entry has two numbers.


-- 
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 closed issue #5690: GHA DB tests fail if you modify the migration after creation in the same PR

Posted by GitBox <gi...@apache.org>.
ocket8888 closed issue #5690:
URL: https://github.com/apache/trafficcontrol/issues/5690


   


-- 
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] rimashah25 commented on issue #5690: GHA DB tests fail if you modify the migration after creation in the same PR

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


   I can take this one. 


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