Exit with specified exit code when runner is outdated#4285
Merged
TingluoHuang merged 7 commits intoactions:mainfrom Mar 13, 2026
Merged
Exit with specified exit code when runner is outdated#4285TingluoHuang merged 7 commits intoactions:mainfrom
TingluoHuang merged 7 commits intoactions:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for a user-configurable process exit code when the runner is rejected as “outdated”, enabling external orchestrators (e.g., ARC) to distinguish this failure mode from other runner termination cases.
Changes:
- Introduces
ACTIONS_RUNNER_OUTDATED_EXIT_CODEconstant and uses it inRunner.Listenerto return a configurable exit code for “runner outdated” failures. - Updates
run.sh/run.cmdand helper templates to propagate and honor the configured “outdated” exit code instead of normalizing to0.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Runner.Listener/Program.cs | Parses ACTIONS_RUNNER_OUTDATED_EXIT_CODE and uses it when handling the “outdated runner” AccessDenied case. |
| src/Runner.Common/Constants.cs | Adds ACTIONS_RUNNER_OUTDATED_EXIT_CODE to the constants list. |
| src/Misc/layoutroot/run.sh | Exits with the outdated exit code (when configured) so the outer environment can detect it. |
| src/Misc/layoutroot/run.cmd | Adds parsing/validation and propagates the outdated exit code on Windows wrapper. |
| src/Misc/layoutroot/run-helper.sh.template | Propagates the outdated exit code from the listener and exits with it. |
| src/Misc/layoutroot/run-helper.cmd.template | Propagates the outdated exit code from the listener and exits with it. |
TingluoHuang
reviewed
Mar 6, 2026
TingluoHuang
approved these changes
Mar 13, 2026
dawidmalina
pushed a commit
to dawidmalina/github-runner
that referenced
this pull request
Mar 19, 2026
Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exit with exit code 7 when
ACTIONS_RUNNER_RETURN_VERSION_DEPRECATED_EXIT_CODE=1