fix: force base-10 in bash _walltime_to_seconds#916
Merged
Conversation
Collaborator
|
/ok to test 1da24d3 |
prokotg
approved these changes
Apr 17, 2026
Bash treats 08/09 as invalid octal in $((...)) arithmetic, so zero-padded sacct Elapsed fields (e.g. 02:08:45) were erroring out and leaving the accumulated walltime at 0, defeating max_walltime. Prefix each field with 10# so parsing stays decimal, and add a bash regression test. Signed-off-by: Alex Gronskiy <agronskiy@nvidia.com>
1da24d3 to
857ab03
Compare
Collaborator
Author
|
/ok to test 857ab03 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reported here in slack:
max_walltimewas being silently ignored on job chains whose previous run landed on a zero-padded minute/second like02:08:45-- apparentlybashinterprets08/09as octal inside$((...))the arithmetic errors out,_prev_elapsed_secondsstays empty, and the accumulated walltime stays stuck at00:00:00forever, so the chain keeps resuming past the limit.10#forces decimal parsing and restores the guard. Regression test runs the generated bash function against the offending inputs.What checked
02:08:45,04:09:06and observed it failing -- then applied the fix