show helpful error message when resolving actions directly with launch#3874
Merged
TingluoHuang merged 2 commits intomainfrom May 29, 2025
Merged
show helpful error message when resolving actions directly with launch#3874TingluoHuang merged 2 commits intomainfrom
TingluoHuang merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a feature flag (DisplayHelpfulActionsDownloadErrors) to toggle enhanced error messages when resolving action download info via the launch service, adds a new V2 API surface with richer error handling (422/429), and updates the worker and tests to exercise the new behavior.
- Add
DisplayHelpfulActionsDownloadErrorsflag and overloads inILaunchServer/LaunchServer&ActionManager - Extend
LaunchHttpClientwithGetResolveActionsDownloadInfoAsyncV2for custom 422/429 handling - Add L0 tests for success and unprocessable-entity error paths in the new client
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Runner.Common/Constants.cs | Introduce DisplayHelpfulActionsDownloadErrors feature flag |
| src/Runner.Common/LaunchServer.cs | Add overload for ResolveActionsDownloadInfoAsync |
| src/Runner.Worker/ActionManager.cs | Wire feature-flag into launchServer.ResolveActions... call |
| src/Sdk/WebApi/WebApi/LaunchHttpClient.cs | Implement GetResolveActionsDownloadInfoAsyncV2 with 422/429 |
| src/Sdk/WebApi/WebApi/LaunchContracts.cs | Add data contracts for resolution errors |
| src/Test/L0/Worker/ActionManagerL0.cs | Update mock to include new boolean parameter |
| src/Test/L0/Sdk/LaunchWebApi/LaunchHttpClientL0.cs | New tests for success and 422 error cases |
Comments suppressed due to low confidence (3)
src/Test/L0/Sdk/LaunchWebApi/LaunchHttpClientL0.cs:77
- Add a unit test for the HTTP 429 (TooManyRequests) path to ensure
NonRetryableActionDownloadInfoExceptionis thrown with the expected message.
[Fact]
src/Sdk/WebApi/WebApi/LaunchHttpClient.cs:40
- [nitpick] Consider renaming
GetResolveActionsDownloadInfoAsyncV2to something more descriptive (e.g.GetResolveActionsDownloadInfoWithErrorsAsync) to clarify its behavior and avoid version suffixes in public API names.
public async Task<ActionDownloadInfoCollection> GetResolveActionsDownloadInfoAsyncV2(Guid planId, Guid jobId, ActionReferenceList actionReferenceList, CancellationToken cancellationToken)
src/Runner.Common/LaunchServer.cs:18
- This interface change is breaking for implementers. Consider adding a default-valued overload or a non-breaking extension method rather than modifying the existing signature.
Task<ActionDownloadInfoCollection> ResolveActionsDownloadInfoAsync(Guid planId, Guid jobId, ActionReferenceList actionReferenceList, CancellationToken cancellationToken, bool displayHelpfulActionsDownloadErrors);
TingluoHuang
approved these changes
May 29, 2025
This was referenced Jun 3, 2025
sirredbeard
pushed a commit
to sirredbeard/runner
that referenced
this pull request
Jun 11, 2025
sirredbeard
pushed a commit
to sirredbeard/runner
that referenced
this pull request
Jun 11, 2025
LouisHaftmann
pushed a commit
to falcondev-oss/github-actions-runner
that referenced
this pull request
Aug 3, 2025
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.
Related: https://github.com/github/actions-runtime/issues/5135
Before:

vs. After:

actions-dotnet implementation: https://github.com/github/actions-dotnet/blob/f9322e925c9f23d04fb974295604864fd4a195cc/Launch/Sdk/Server/LaunchApi.cs#L87-L98