Pipeline doesn't succeed when manual jobs using new DAG dependency "needs:" are waiting for other "when: manual" jobs to succeed
Summary
Pipeline doesn't succeed when jobs with "when:manual" and using new DAG dependency "needs:" are waiting for other "when: manual" jobs to succeed
Steps to reproduce
- Create 3 stages
- Add a regular job on the 1st stage
- Add manual jobs (with the "when: manual" keyword on .gitlab-ci.yaml) on the 2nd stage (with or without regular jobs)
- On the 3rd stage create either 1) an automatic job that has "allow_failure: true" and/or 2) a manual job
- Add a "needs: " tag on the jobs of the 3rd stage and make them depend on at least one manual job on the 2nd stage
- Run the flow and it will stay "running" forever while manual jobs aren't canceled.
What is the current bug behavior?
Pipeline stays in the "running" sate forever since all next stage's manual jobs that have dependencies are waiting for the previous stage's manual jobs to end, even if they are all allowed to fail.
This also affects the "Merge" button when merges are only allowed if a pipeline succeeds, since it stays disabled if a pipeline does not succeed. The screenshots below depict a scenario where we expect that the pipeline success does not depend on QA jobs to finish, while taking advantage of the new DAG feature.
What is the expected correct behavior?
One should expect to see the pipeline marked as "Passed", either green or orange, when the pipeline is left with only manual jobs or automatic jobs that allows failure.
As a note, if one setups a set of manual jobs to run on a stage without having jobs depending on them with the "needs:" keyword, the pipeline ignores them to set the pipeline's success or not (this considering the default behavior of allowing them to fail).
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Possible fixes
If this is the expected behavior, I suggest adding a new keyword to the "when: " or the "allow_failure: " keyword, something that allows the pipeline to ignore the jobs' outcome for it to succeed.