Pipeline does not reflect current state of variables until pushing
Summary
I'm trying to make sure WIP merge requests' pipelines are not run, to avoid a lot of worker congestion. It seems the way to do this currently is to make the relevant variable available and check its contents:
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_TITLE !~ /^WIP:/
Unfortunately changing the merge request title doesn't change the pipeline until new changes are pushed.
Steps to reproduce
- Use the above in a CI job configuration.
- Create an MR with a title like "WIP: Foo"
- Edit the MR
- Remove the "WIP: " prefix from the MR name
- Save
What is the current bug behavior?
The pipeline is still in the "WIP" state, so I can't run (or even see) any jobs with the above configuration. To run the pipeline I have to push more changes to the MR.
What is the expected correct behavior?
It should at the very least be possible to run the pipeline. Ideally the pipeline should run the now enabled jobs in their original "non-WIP" sequence as if changes had just been pushed.
Results of GitLab environment info
I'm not admin. Is there some way I can get the relevant information as an end user?
Results of GitLab application Check
I'm not admin. Is there some way I can get the relevant information as an end user?
Possible fixes
I'm not aware of some way to simply disable pipelines for WIP MRs. If such a thing exists it would be enormously time saving.
A custom hack using tags might be necessary to work around this issue for now.
Making CI_MERGE_REQUEST_*
variables available in all MR pipelines would be another possibility.
The original intent is a duplicate of Disable CI Builds for WIP MRs plus Trigger a build for a merge request after wip
prefix is removed from merge request title, although fixing both of those would not necessarily fix this issue.
Another possible duplicate is this comment.