Skip to content

show helpful error message when resolving actions directly with launch #3874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 29, 2025

Conversation

aiqiaoy
Copy link
Contributor

@aiqiaoy aiqiaoy commented May 28, 2025

@Copilot Copilot AI review requested due to automatic review settings May 28, 2025 02:43
@aiqiaoy aiqiaoy requested a review from a team as a code owner May 28, 2025 02:43
Copy link
Contributor

@Copilot 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

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 DisplayHelpfulActionsDownloadErrors flag and overloads in ILaunchServer/LaunchServer & ActionManager
  • Extend LaunchHttpClient with GetResolveActionsDownloadInfoAsyncV2 for 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 NonRetryableActionDownloadInfoException is thrown with the expected message.
[Fact]

src/Sdk/WebApi/WebApi/LaunchHttpClient.cs:40

  • [nitpick] Consider renaming GetResolveActionsDownloadInfoAsyncV2 to 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 TingluoHuang merged commit a906ec3 into main May 29, 2025
13 of 16 checks passed
@TingluoHuang TingluoHuang deleted the aiqiaoy/actions-resolution-errors branch May 29, 2025 02:46
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
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