Unable to run pipelines in the parent project
Summary
The "Run pipelines in the parent project" feature is no longer working.
This issue started when we upgraded from GitLab 18.0.1 to GitLab 18.2.2.
I have a parent project and a source project. I've created an MR in the parent project to merge a change from the source project. As expected, the MR pipeline created when the MR was created runs in the context of the source project.
Then, following https://docs.gitlab.com/ci/pipelines/merge_request_pipelines/#run-pipelines-in-the-parent-project a member of the parent project's developer role goes the MR's "Pipelines" tab and presses the "Run Pipeline" button.
What is expected to happen is a warning dialog, then when accepted, a pipeline runs in the context of the parent project. This is as documented at https://docs.gitlab.com/ci/pipelines/merge_request_pipelines/#run-pipelines-in-the-parent-project
What actually happens is no warning dialog appears and the pipeline runs in the source project context.
Per https://docs.gitlab.com/ci/pipelines/merge_request_pipelines/#prevent-pipelines-from-fork-projects I checked the configuration of both the source and parent projects, and both have ci_allow_fork_pipelines_to_run_in_parent_project
set to true
.
Steps to reproduce
- Have a parent project
- Fork the parent project, call the fork the source project
- Commit a change to the source project
- Create an MR in the parent project merging the source project's changed branch to the parent project
- Notice that a pipeline is created and it runs using the source project context
- As a user with the developer role in the parent project, go to the MR's "Pipelines" tab and click the "Run Pipeline" button
Example Project
Reproducible on our self hosted GitLab instance
What is the current bug behavior?
No warning dialog appears and the pipeline runs in the source project context.
What is the expected correct behavior?
A warning dialog, then when accepted, a pipeline runs in the context of the parent project. This is as documented at https://docs.gitlab.com/ci/pipelines/merge_request_pipelines/#run-pipelines-in-the-parent-project
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
GitLab version is GitLab Enterprise Edition v18.2.2-ee
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Patch release information for backports
If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.
Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.
High-severity bug remediation
To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.