Report job has infra failure to run-service#4073
Merged
TingluoHuang merged 1 commit intomainfrom Oct 13, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for reporting infrastructure failures to the run service. The changes introduce a new boolean parameter hasInfrastructureFailure throughout the job completion pipeline, allowing the system to track and report when jobs fail due to infrastructure issues rather than code-related problems.
- Added
hasInfrastructureFailureparameter to job completion APIs and contracts - Implemented logic to detect infrastructure issues from job annotations and set the failure flag
- Updated all call sites to pass the new parameter through the completion flow
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Sdk/RSWebApi/RunServiceHttpClient.cs | Added hasInfrastructureFailure parameter to CompleteJobAsync method |
| src/Sdk/RSWebApi/Contracts/IssueExtensions.cs | Added IsInfrastructureIssue property mapping from issue annotations |
| src/Sdk/RSWebApi/Contracts/CompleteJobRequest.cs | Added HasInfrastructureFailure property to the request contract |
| src/Runner.Worker/JobRunner.cs | Updated CompleteJobAsync call to pass the infrastructure failure flag |
| src/Runner.Worker/GlobalContext.cs | Added HasInfrastructureFailure property to track infrastructure failures |
| src/Runner.Worker/ExecutionContext.cs | Added logic to detect infrastructure issues and set the global flag |
| src/Runner.Listener/JobDispatcher.cs | Updated ForceFailJob to pass hasInfrastructureFailure parameter |
| src/Runner.Common/RunServer.cs | Updated interface and implementation to include hasInfrastructureFailure parameter |
bd5fbd1 to
9421d45
Compare
TingluoHuang
commented
Oct 13, 2025
| public string BillingOwnerId { get; set; } | ||
|
|
||
| [DataMember(Name = "infrastructureFailureCategory", EmitDefaultValue = false)] | ||
| public string InfrastructureFailureCategory { get; set; } |
Member
Author
There was a problem hiding this comment.
i will make run-service take this new field in the server side PR.
TingluoHuang
commented
Oct 13, 2025
| // Log the error and fail the PrepareActionsAsync Initialization. | ||
| Trace.Error($"Caught exception from PrepareActionsAsync Initialization: {ex}"); | ||
| executionContext.InfrastructureError(ex.Message); | ||
| executionContext.InfrastructureError(ex.Message, category: "resolve_action"); |
Member
Author
There was a problem hiding this comment.
this is what we missed with run-service.
TingluoHuang
commented
Oct 13, 2025
| // Log the error and fail the PrepareActionsAsync Initialization. | ||
| Trace.Error($"Caught exception from PrepareActionsAsync Initialization: {ex}"); | ||
| executionContext.InfrastructureError(ex.Message); | ||
| executionContext.InfrastructureError(ex.Message, category: "invalid_action_download"); |
Member
Author
There was a problem hiding this comment.
this is what we missed with run-service.
yaananth
approved these changes
Oct 13, 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.
https://github.com/github/actions-runtime/issues/5301