-
Notifications
You must be signed in to change notification settings - Fork 879
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
Required status check job is skipped when one of the dependent job fails #2566
Comments
Workaround, let GitHub Actions throw an exception instead adding result skipped (you get no check status for the job, rerun will clear the old job status before execution of dependencies) I know this is not supported.
The if condition is complex to preserve beeing able to cancel the job, if it is running. Every job depending on that one won't get the chance to run if the condition fails even if you use |
Thank you @ChristopherHX for the workaround. With the workaround, If the pre-requisite job is skipped results get no check status. |
updated the workaround to force fail for both failure and cancelled conditions
That seems to also work with skipping "results" job when "pre-requisite" job is skipped |
Hey @jaymalasinha, |
Hi @ruvceskistefan, We figured a workaround for the issue, but won't the expected behavior be that the status check job fails if any of its dependent jobs fail ? We did see that behavior in earlier workflows when we added a required status check job with multiple dependent jobs, but now noticed it started skipping the job incase of dependency failures. So reported it as a bug. We have to workaround it by negating the status check condition, which seems like a temporary hack. Can you please reopen, thanks. |
same issue there, seems some breaking changes happened |
The workaround didn't work for me. While it failed when the dependent job failed, it also skipped when the dependent job succeeded, which is a massive regression. |
The workaround is an ugly hack. I would love to have a proper way of doing this. |
Describe the bug
When one of the required dependent jobs fail in the workflow, the job requiring it is skipped.
needs: [build-one, build-two, test, test-more]
To Reproduce
Create the following workflow file:
The job "results" is a required status check for merge. When the job "test" fails the job "results" is skipped
Expected behavior
The job "results" needs "test" to succeed, so I would expect it to not be skipped, as skipped status check allows merge.
Expect "results" to be skipped if any of the dependent jobs are skipped, like if "test" is skipped, but expect it to fail if any of the dependent jobs fail.
Runner Version and Platform
Current runner version: '2.303.0'
Ubuntu
22.04.2
LTS
Runner Image Provisioner
2.0.139.1
OS of the machine running the runner? OSX/Windows/Linux/...
Ubuntu
What's not working?
The text was updated successfully, but these errors were encountered: