From c4b6d288d45e7c737a35605f672a6351c1a06cfd Mon Sep 17 00:00:00 2001 From: Thomas Boop <52323235+thboop@users.noreply.github.com> Date: Tue, 5 Oct 2021 04:15:19 -0400 Subject: [PATCH] fix ephemeral runner upgrade on mac/linux (#1403) --- releaseNote.md | 7 +------ src/Misc/layoutroot/run.sh | 15 +++++++++++++++ src/runnerversion | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/releaseNote.md b/releaseNote.md index aeed81a09..cef16c589 100644 --- a/releaseNote.md +++ b/releaseNote.md @@ -2,15 +2,10 @@ ## Bugs -- Fixed an issue where ephemeral runners deregistered themselves when jobs were not successful (#1384) -- Fixed an issue where you were not able to un-configure a runner that changed groups (#1359) -- Disable `stop-commands` command using well known keywords as a token (#1371) +- Fixed an issue where ephemeral runners did not restart after upgrading (#1396) ## Misc -- Don't retry 422 error codes when downloading actions (#1352) -- Handle upgrade more smoothly on OSX (#1381) - ## Windows x64 We recommend configuring the runner in a root folder of the Windows drive (e.g. "C:\actions-runner"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows. diff --git a/src/Misc/layoutroot/run.sh b/src/Misc/layoutroot/run.sh index 66b933b63..03bb10adc 100755 --- a/src/Misc/layoutroot/run.sh +++ b/src/Misc/layoutroot/run.sh @@ -43,6 +43,21 @@ else else sleep 5 fi + elif [[ $returnCode == 4 ]]; then + if [ ! -x "$(command -v sleep)" ]; then + if [ ! -x "$(command -v ping)" ]; then + COUNT="0" + while [[ $COUNT != 5000 ]]; do + echo "SLEEP" > /dev/null + COUNT=$[$COUNT+1] + done + else + ping -c 5 127.0.0.1 > /dev/null + fi + else + sleep 5 + fi + "$DIR"/bin/Runner.Listener run $* else exit $returnCode fi diff --git a/src/runnerversion b/src/runnerversion index 0bddf2b74..990835884 100644 --- a/src/runnerversion +++ b/src/runnerversion @@ -1 +1 @@ -2.283.2 +2.283.3