Pipeline status does not update for on MR view for MR submitted from downstream fork
Summary
Omnibus 14.2.1, user has reproduced with several runner versions including 14.2
Persistent "Checking pipeline status" message and animation when reviewing an MR submitted from downstream fork. The behavior persists regardless of the visibility of the upstream project and the permission level (Reporter, Maintainer, or Developer) granted to the user who forks. The "Merge" button is cautionary red, so the user is led to believe they are taking a risk by merging, because the status of the pipeline never updates. The message remains after manual approval from the MR review page. The correct pipeline status is shown in "Pipelines" view accessed from beneath the "CI/CD" heading in the left sidebar.
Edit: I am unable to reproduce this behavior while impersonating another user. Must be signed in "for real".
Steps to reproduce
-
User1 creates a project with a simple .gitlab-ci.yml that is configured to automatically run. -- I created a fresh non-admin user titled "test_user1" and created project "CI Status" and added a
.gitlab_ci.yml
with the below :
stages:
- test
test-mr-status:
stage: test
rules:
- when: always
script:
- echo "test"
-
User1 adds User2 to the project and grants them reporter access. -- Added user "test_user2" with reporter access, maintainer, and developer access in first, second, and third reproduction attempts, respectively.
-
User2 forks the project into their own namespace. -- test_user2 forked the the project into test_user2's namespace, project titled "CI Status -- FORK".
-
User2 makes a minor change to their fork of the project and merges into main. -- I added a simple README.md and merged back into main on the fork project. The downstream pipeline passed and shows in the downstream project. In later testing, I reproduced by editing a file in main without downstream branching. From forked project:
-
User2 submits an MR from the fork back to the upstream project created by User1. -- test_user2 submits MR from main on fork to main on upstream. Parent project sees the MR but cannot retrieve the pipeline status and shows an alert with a red "Merge" that leads the user to believe that merging is risky.
Upstream can see status of pipeline if viewing "Pipelines" view from the left sidebar:
- User1 is unable to see the pipeline status of the MR made by User2. -- I waited 5 minutes and refreshed the MR view on the upstream project, but the "Checking pipeline status" remained. Notice that one can see the SHA of the commit that was merged, but "Checking pipeline status" message and animation remain.:
But can see actual status from pipeline view:
Example Project
What is the current bug behavior?
Pipeline status indicator never updates.
What is the expected correct behavior?
Pipeline status updates.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
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)