When a job received cancellation request, steps with condition always() still eligible to be run normally. However go context.Context() is canceled, so that steps will be failed.
Find the way handle this edge case properly.
actions/runner logic:
- the job status is marked as
cancelled
- the step’s condition is re-evaluated
- if
fail, cancel the step
- if
true, the step is continue running
Normal steps and embedded steps, the step CancellationTokenSource is not linked to the parent/job token.
ref: https://github.com/actions/runner/blob/v2.335.1/src/Runner.Worker/StepsRunner.cs#L149-L186
When a job received cancellation request, steps with condition
always()still eligible to be run normally. However gocontext.Context()is canceled, so that steps will be failed.Find the way handle this edge case properly.
actions/runnerlogic:cancelledfail, cancel the steptrue, the step is continue runningNormal steps and embedded steps, the step
CancellationTokenSourceis not linked to the parent/job token.ref: https://github.com/actions/runner/blob/v2.335.1/src/Runner.Worker/StepsRunner.cs#L149-L186