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

The outdated runner fails to start silently without reporting a failure exit code #3266

Open
Felixoid opened this issue Apr 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Felixoid
Copy link

Felixoid commented Apr 30, 2024

Describe the bug
When the runner is outdated and supposed to be upgraded, it doesn't report the exit code != 0

To Reproduce
Steps to reproduce the behavior:

  1. Go to the runner directory
  2. Run the configuration to register it without auto update ./config.sh --url $RUNNER_URL --token "$(get_runner_token)" --ephemeral --disableupdate --unattended --runnergroup Default --labels "$LABELS" --work _work --name "$INSTANCE_ID"
  3. Then try to launch it ./run.sh && echo This piece of art just silently fails || echo GH does at least anything right

Expected behavior
Obviously, the application failing to start must report an error. But instead, we see the next:

√ Connected to GitHub

Current runner version: '2.313.0'
2024-04-30 10:58:45Z: Listening for Jobs
An error occured: Runner version v2.313.0 is deprecated and cannot receive messages.
Runner listener exit with terminated error, stop the service, no retry needed.
Exiting runner...
This piece of art just silently fails

Runner Version and Platform

2.313.0

OS of the machine running the runner? Linux

Reasons

This line should be exit $returnCode, but instead it masks errors.

Although, not only run.sh masks the exit code, but as well the run-helper.sh does it here:

$ bash -x /home/ubuntu/actions-runner/run-helper.sh
++ id -u
+ user_id=1000
+ '[' 1000 -eq 0 -a -z '' ']'
+ shopt -s nocasematch
+ SOURCE=/home/ubuntu/actions-runner/run-helper.sh
+ '[' -h /home/ubuntu/actions-runner/run-helper.sh ']'
+++ dirname /home/ubuntu/actions-runner/run-helper.sh
++ cd -P /home/ubuntu/actions-runner
++ pwd
+ DIR=/home/ubuntu/actions-runner
+ '[' '!' -z '' ']'
+ updateFile=update.finished
+ /home/ubuntu/actions-runner/bin/Runner.Listener run

√ Connected to GitHub

Current runner version: '2.313.0'
2024-04-30 11:29:21Z: Listening for Jobs
An error occured: Runner version v2.313.0 is deprecated and cannot receive messages.
+ returnCode=1 # <------ exit code 1
+ [[ 1 == 0 ]]
+ [[ 1 == 1 ]]
+ echo 'Runner listener exit with terminated error, stop the service, no retry needed.'
Runner listener exit with terminated error, stop the service, no retry needed.
+ exit 0 # <------ but who cares ¯\_(ツ)_/¯
@Felixoid Felixoid added the bug Something isn't working label Apr 30, 2024
@Felixoid Felixoid changed the title The outdated runner fails to start silently without reporting a falure exit code The outdated runner fails to start silently without reporting a failure exit code Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant