Skip to content
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

Mark job as failed on worker crash. #3006

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Mark job as failed on worker crash. #3006

merged 1 commit into from
Nov 27, 2023

Conversation

TingluoHuang
Copy link
Member

@TingluoHuang TingluoHuang commented Nov 27, 2023

This pull request includes a change to the LogWorkerProcessUnhandledException method (called when the worker process crashed) in JobDispatcher.cs to add a new condition. If feature flag DistributedTask.MarkJobAsFailedOnWorkerCrash is true, the job is marked as failed and completed.

Main change:

  • src/Runner.Listener/JobDispatcher.cs: Added a new condition to the LogWorkerProcessUnhandledException method to check if DistributedTask.MarkJobAsFailedOnWorkerCrash is true. If so, the job is marked as failed and completed.

Without mark the job as completed, the service will try to infer the job results from several different conditions, and those can be wrong.

Job is marked as failed when the worker crash with this change.

image

Fixing:
https://github.com/github/c2c-actions-support/issues/3078
https://github.com/github/c2c-actions-support/issues/3028

@TingluoHuang TingluoHuang requested a review from a team as a code owner November 27, 2023 21:07
@TingluoHuang TingluoHuang merged commit 661b261 into main Nov 27, 2023
10 checks passed
@TingluoHuang TingluoHuang deleted the users/tihuang/fix branch November 27, 2023 21:43
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.

None yet

2 participants