Skip to content

Mark job as failed on worker crash.#3006

Merged
TingluoHuang merged 1 commit intomainfrom
users/tihuang/fix
Nov 27, 2023
Merged

Mark job as failed on worker crash.#3006
TingluoHuang merged 1 commit intomainfrom
users/tihuang/fix

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
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.

2 participants