Job with needs will run even when needed job does not
Summary
A job with needs will run even if the job it needs does not if, for instance, a prior stage fails.
Steps to reproduce
The following .gitalb-ci.yml file will induce the error.
stages:
- one
- two
- three
one:
stage: one
script:
- exit 1
two:
stage: two
script:
- echo "two"
three:
stage: three
script:
- echo "three"
needs: ["two"]
What is the current bug behavior?
- job
onefails, as expected. - job
twois skipped, as expected. - job
three, which 'needs' jobtwo, runs.
What is the expected correct behavior?
- job
onefails. - job
twois skipped. - job
threeis skipped.
Results of GitLab environment info
12.5.0-ee