-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Issue 1698: Use safe_sleep executable in bash scripts #1707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 1698: Use safe_sleep executable in bash scripts #1707
Conversation
| elif [[ $returnCode == 2 ]]; then | ||
| echo "Runner listener exit with retryable error, re-launch runner in 5 seconds." | ||
| safe_sleep | ||
| ./bin/safe_sleep.sh 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm always a bit iffy on relative paths, does is work fine if I start run.sh with an absolute path from a different directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed to absolute paths and changed the location of the safe_sleep script, so it is not in bin folder.
fhammerl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
How this got merged? This is definitely endless loop. runner/src/Misc/layoutroot/safe_sleep.sh Lines 3 to 6 in 0ebdf9e
EDIT. Oh, SECONDS is autoincremented by bash. didn't know that. |
|
Why is this not attempting to yield using a potentially available sleep call on the systems where that is available. Ie close to all systems. Could just do that inside the new loop. Busy waiting is always really bad. |
Problems were:
sleepin the case when both ping and sleep are missing insafe_sleepfunctionsleepfunction instead ofsafe_sleepin bash scriptRelated issue: #1698
After this change,
safe_sleepis implemented as separate executable bash script, and scriptsrun-helper.shandupdate.share using that function instead of standardsleepfunction.