-
Notifications
You must be signed in to change notification settings - Fork 1k
cancelled()
returns false
after workflow cancel
#3041
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
Comments
Debug run output of the
|
cancelled()
returns false
after workflow cancel
Just happened again, and I think I figured out why:
I couldn't find any mention of this inconsistent behavior. |
Hey @GuyAv46,
|
The problem is that if I only skip the task, it's enough for the required tasks for the branch protection rules, and the PR is approved. I had to force this job to run and fail if there was a fail/cancel. My solution was to add "cancelled" to the expected output for failure:
|
I'm seeing this behaviour as well when using any of the various of
I've tried using just |
After I thought I found the workaround I needed, it happened again.
|
Debug logging is pretty useless if you can't see the content of the |
I figured out what is the problem. |
Using
|
I came across this issue as well. From what I can tell, it's specific to having a matrix that calls a reusable workflow. When one job of the matrix fails, and others fail fast, it reports a I have a simple reproduction in this repo with runs showing the behavior, and also started this discussion post yesterday. In the simple case of a single matrix (I don't have any matrix calling another matrix), using |
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days. |
This issue was closed because it has been stalled for 15 days with no activity. |
Describe the bug
I have a branch protection rule that requires a
pr-validation
job to be successful for merging a PR:Some of the jobs in the
needs
list are complex and use matrixes to trigger reusable workflows, some of them also use matrixes and trigger more reusable workflows.As you can see here, this job was running successfully when:
Expected behavior
needs
list failed before the workflow cancelation, so if the job was to run, theexit 1
step was expected to be executed.But for some reason, the job ran and ended successfully, and approved the PR.
Runner Version and Platform
OS of the machine running the runner? OSX/Windows/Linux/...
What's not working?
Please include error messages and screenshots.
Job Log Output
If applicable, include the relevant part of the job / step log output here. All sensitive information should already be masked out, but please double-check before pasting here.
Runner and Worker's Diagnostic Logs
If applicable, add relevant diagnostic log information. Logs are located in the runner's
_diag
folder. The runner logs are prefixed withRunner_
and the worker logs are prefixed withWorker_
. Each job run correlates to a worker log. All sensitive information should already be masked out, but please double-check before pasting here.The text was updated successfully, but these errors were encountered: