Open
Description
Describe the bug
Ephemeral runner tries to restart on job cancellation.
Scenario:
Runner.Listner exits with a retriable error on job cancellation
runner log:
Job <JOB NAME> completed with result: Canceled | <RUNNER_ID>
Runner listener exit with retryable error, re-launch runner in 5 seconds.
For the ephemeral run, a restart does not make sense since the runner is unregistered, though runs.sh trying to restart the runner. See line:
runner/src/Misc/layoutroot/run.sh
Line 21 in 1c319b4
which leads to an error:
Failed to create a session. The runner registration has been deleted from the server, please re-configure. Runner registrations are automatically deleted for runners that have not connected to the service recently.
To Reproduce
Steps to reproduce the behavior:
- config runner as ephemeral with ./config.sh .. --ephemeral
- start a runner with ./run.sh
- let it to run a job and cancel it
- observe the error
Expected behavior
Ephemeral runner should not try to restart on job cancellation or other exit errors
Runner Version and Platform
Version of your runner? any (2.323.0)
OS of the machine running the runner? linux
What's not working?
incorrect exit error handling for ephemeral case
Job Log Output
in description