Repository navigation
Conversation
CompositeActionHandler set the job result to Canceled on any job cancellation. StepsRunner has used Failed on a runner shutdown since actions#1792. A composite step that runs after the stopped one hit the already-cancelled branch and overwrote the result with Canceled. Apply the same RunnerShutdownToken check in both places. Fixes actions#4890 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Fixes #4890.
When the runner receives a shutdown signal while a composite action step runs,
CompositeActionHandlersets the job result toCanceledunconditionally.StepsRunnerhas chosenFailedon a runner shutdown since #1792. If the composite action has another step after the stopped one, that step's "job was already cancelled" branch runs last and the job ends cancelled.This applies the same
RunnerShutdownTokencheck in both places ofCompositeActionHandler:User cancellation still ends the job
Canceled.Reproduction: https://github.com/Akais24/runner-composite-shutdown-repro sends SIGTERM to
Runner.Listenerduring a plain step, during the last step of a composite action, and during a composite step that has another step after it. On 2.338.2 the third job endscancelledand the other twofailure(runs 45765619032, 45765789878).Testing:
./dev.sh layoutand./dev.sh testpass on osx-arm64. No L0 test was added: there is no harness that runsCompositeActionHandler.RunAsyncwith embedded steps, and #1792 added none for theStepsRunnerchange either. I can add one if you prefer.I used an AI assistant to write this change and this description.