Skip to content
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

Merged
merged 4 commits into from
Mar 1, 2022
Merged

Issue 1698: Use safe_sleep executable in bash scripts #1707

merged 4 commits into from
Mar 1, 2022

Conversation

ruvceskistefan
Copy link
Collaborator

Problems were:

  • the implementation of sleep in the case when both ping and sleep are missing in safe_sleep function
  • usage of standard sleep function instead of safe_sleep in bash script

Related issue: #1698

After this change, safe_sleep is implemented as separate executable bash script, and scripts run-helper.sh and update.sh are using that function instead of standard sleep function.

@ruvceskistefan ruvceskistefan requested a review from a team as a code owner February 22, 2022 13:53
@@ -44,17 +28,17 @@ elif [[ $returnCode == 1 ]]; then
exit 0
elif [[ $returnCode == 2 ]]; then
echo "Runner listener exit with retryable error, re-launch runner in 5 seconds."
safe_sleep
./bin/safe_sleep.sh 5
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

@thboop thboop requested a review from fhammerl February 23, 2022 21:33
@fhammerl fhammerl enabled auto-merge (squash) March 1, 2022 13:02
Copy link
Contributor

@fhammerl fhammerl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants