Skip to content

Exit with specified exit code when runner is outdated#4285

Merged
TingluoHuang merged 7 commits intoactions:mainfrom
nikola-jokic:nikola-jokic/exit-outdated-exit-code
Mar 13, 2026
Merged

Exit with specified exit code when runner is outdated#4285
TingluoHuang merged 7 commits intoactions:mainfrom
nikola-jokic:nikola-jokic/exit-outdated-exit-code

Conversation

@nikola-jokic
Copy link
Copy Markdown
Contributor

@nikola-jokic nikola-jokic commented Mar 6, 2026

Exit with exit code 7 when ACTIONS_RUNNER_RETURN_VERSION_DEPRECATED_EXIT_CODE=1

@nikola-jokic nikola-jokic requested a review from a team as a code owner March 6, 2026 14:21
Copilot AI review requested due to automatic review settings March 6, 2026 14:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_CODE constant and uses it in Runner.Listener to return a configurable exit code for “runner outdated” failures.
  • Updates run.sh / run.cmd and helper templates to propagate and honor the configured “outdated” exit code instead of normalizing to 0.

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 TingluoHuang merged commit c5dcf59 into actions:main Mar 13, 2026
11 checks passed
@nikola-jokic nikola-jokic deleted the nikola-jokic/exit-outdated-exit-code branch March 13, 2026 23:37
dawidmalina pushed a commit to dawidmalina/github-runner that referenced this pull request Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants