Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts the runner self-update flows to avoid propagating exceptions during self-update failures (per actions-runtime issue #5424), and instead surface failures via logging/terminal output while allowing the listener to continue running.
Changes:
- Stop rethrowing exceptions from
SelfUpdatein both legacy and V2 self-updaters. - Add error logging (
Trace.Error) and user-visible terminal error output when self-update fails.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Runner.Listener/SelfUpdater.cs | Swallows self-update exceptions and logs/shows an error instead of throwing. |
| src/Runner.Listener/SelfUpdaterV2.cs | Same change for the newer self-update flow (message contains package metadata directly). |
Comments suppressed due to low confidence (2)
src/Runner.Listener/SelfUpdater.cs:126
- This changes the contract of
SelfUpdatefrom throwing on failures (e.g., download/validation errors) to swallowing exceptions. The existing L0 tests currently assert exceptions are thrown (e.g.,TestSelfUpdateAsync_DownloadRunner/TestSelfUpdateAsync_ValidateHash); they will need to be updated to assert the newfalsereturn behavior (and/or verify error output).
catch (Exception ex)
{
Trace.Error(ex);
_terminal.WriteError($"Runner update failed: {ex.Message}");
_updateTrace.Enqueue(ex.ToString());
}
src/Runner.Listener/SelfUpdaterV2.cs:126
- This changes the contract of
SelfUpdatefrom throwing on failures (e.g., download/validation errors) to swallowing exceptions. The existing L0 tests forSelfUpdaterV2currently assert exceptions are thrown; they should be updated to reflect the newfalsereturn behavior (and/or verify error output).
catch (Exception ex)
{
Trace.Error(ex);
_terminal.WriteError($"Runner update failed: {ex.Message}");
_updateTrace.Enqueue(ex.ToString());
}
aiqiaoy
previously approved these changes
Mar 3, 2026
efd59f9 to
ea4c543
Compare
aiqiaoy
approved these changes
Mar 3, 2026
dawidmalina
pushed a commit
to dawidmalina/github-runner
that referenced
this pull request
Mar 19, 2026
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.
https://github.com/github/actions-runtime/issues/5424