Do not treat `when:manual` differently between DAG and non-DAG processing
Update
Per #233712 (comment 819688619), we do not plan to work on this issue, but decided to implement #233876 instead.
Summary
Currently, if a job comes after a job that is when: manual
, it is handled differently between DAG and non-DAG pipelines. When allow_failure: true
is set (the default), then a non-DAG pipeline will run the second job immediately, while a DAG pipeline will wait. There isn't a good reason for these to be inconsistent, though, and the non-DAG behavior is the established one that most people expect. So, we are going to make them consistent with the non-DAG behavior as the default.
Here is a sample pipeline:
my_dependency:
stage: build
when:manual
...
my_job:
stage: test
needs: ["my_dependency"] # today, this would wait on `my_dependency` until `my_dependency` runs. After this fix, it will run immediately, just like if there was no `needs` keyword.
...
Existing behavior
If you explicitly want the existing behavior, that is possible by explicitly defining the relationship in this way (i.e., adding allow_failure: false)
:
my_dependency:
stage: build
allow_failure: false
when:manual
...
my_job:
stage: test
needs: ["my_dependency"] # now, this will wait indefinitely on `my_dependency`, since `my_dependency` is now not allowed to fail.
...
We are also working to continue to iterate on DAG behaviors, so also check out the related issues section which we are looking at to make this use case easier.
Steps to reproduce
Create a pipeline that needs
a job that is when:manual
and see that it waits for it. Create a pipeline that has a job in a subsequent stage from a when:manual
job, and see that it runs immediately.
Example Project
https://gitlab.com/jyavorska/testci/-/pipelines/171473911 and https://gitlab.com/jyavorska/testci/-/pipelines/171473940 are the same pipeline and should behave the same.
Note that the infinite running
status is a separate issue: #31264 (closed). The important difference here is auto-deploy
running immediately or not. It should be consistent, and it should be consistent in the way that people expect from non-DAG processing.
What is the current bug behavior?
Job waits on DAG but not on non-DAG
What is the expected correct behavior?
Consistent behavior
Relevant logs and/or screenshots
N/A
Output of checks
This bug happens on GitLab.com
Possible fixes
Remove exception from behavior
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.