Ephemeral self-hosed runner should not try to restart
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
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: https://github.com/actions/runner/blob/1c319b4d4225d4a74ac92f1974ca86b1dac965dc/src/Misc/layoutroot/run.sh#L21
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/Misc/layoutroot/run.sh at line 21 and trace how an ephemeral runner configured with ./config.sh --ephemeral handles listener exit and retry. Reproduce by cancelling a job, then verify that the runner does not attempt to restart after cancellation or another exit error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, shell
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100