Pipelines are linked to wrong MR on Merge Request page
Summary
In our on premise gitlab (v12.9) have a CI/CD pipeline which users can run manually to deploy their accepted MR to a set of environments. On the merge, the correct pipeline is displayed for that MR, but if we look at the closed MRs later, a great deal of our MR will list whatever the latest pipeline is as their pipeline of record.
Here is the latest MR and its pipeline:
and now that pipeline is the pipeline of record for older MRs as well, which is wrong
We looked at this issue:
and felt like maybe this is somehow related
Steps to reproduce
- create branch from master
- do work on branch
- merge branch into master
- go to merge merged request page (/-/merge_requests?scope=all&utf8=✓&state=merged)
- all (most) of the MRs will have the newest pipeline, and not the pipeline created by the MR
Important Notes: we use FF merging, and we recently downgraded from EE to CE before we noticed the issue.
Example Project
NA
What is the current bug behavior?
The most current pipeline is linked to many MRs
What is the expected correct behavior?
The correct pipeline should be properly displayed on the MR page.
Relevant logs and/or screenshots
see screenshots above
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
[33mSystem information[0m System: Current User: git Using RVM: no Ruby Version: 2.6.5p114 Gem Version: 2.7.10 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: [31munknown[0m Git Version: [31munknown[0m Sidekiq Version:5.2.7 Go Version: [31munknown[0m [33mGitLab information[0m Version: 12.8.8 Revision: Directory: /srv/gitlab DB Adapter: PostgreSQL DB Version: 9.6.11 URL: https://code.wm.edu HTTP Clone URL: https://code.wm.edu/some-group/some-project.git SSH Clone URL: git@code.wm.edu:some-group/some-project.git Using LDAP: no Using Omniauth: [32myes[0m Omniauth Providers: saml [33mGitLab Shell[0m Version: 11.0.0 Repository storage paths: - default: /var/opt/gitlab/repo - part_two: /var/opt/gitlab/repo GitLab Shell path: /home/git/gitlab-shell Git: /usr/bin/git
Results of GitLab application Check
Please note we are running in k8s mode, so some of these will have errors.
Expand for output related to the GitLab application check
Checking [33mGitLab subtasks[0m ...
Checking [33mGitLab Shell[0m ...
GitLab Shell: ... GitLab Shell version >= 11.0.0 ? ... [32mOK (11.0.0)[0m Running /home/git/gitlab-shell/bin/check [31mgitlab-shell self-check failed[0m [34m Try fixing it:[0m Make sure GitLab is running; Check the gitlab-shell configuration file: sudo -u git -H editor /home/git/gitlab-shell/config.yml [31m Please fix the error above and rerun the checks.[0m
Checking [33mGitLab Shell[0m ... [32mFinished[0m
Checking [33mGitaly[0m ...
Gitaly: ... default ... [32mOK[0m part_two ... [32mOK[0m
Checking [33mGitaly[0m ... [32mFinished[0m
Checking [33mSidekiq[0m ...
Sidekiq: ... Running? ... [31mno[0m [34m Try fixing it:[0m sudo -u git -H RAILS_ENV=production bin/background_jobs start [34m For more information see:[0m doc/install/installation.md in section "Install Init Script" see log/sidekiq.log for possible errors [31m Please fix the error above and rerun the checks.[0m
Checking [33mSidekiq[0m ... [32mFinished[0m
Checking [33mIncoming Email[0m ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking [33mIncoming Email[0m ... [32mFinished[0m
Checking [33mLDAP[0m ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking [33mLDAP[0m ... [32mFinished[0m
Checking [33mGitLab App[0m ...
Git configured correctly? ... [31mno[0m Trying to fix error automatically. ...[31mFailed[0m [34m Try fixing it:[0m sudo -u git -H "/usr/bin/git" config --global core.autocrlf "input" [34m For more information see:[0m doc/install/installation.md in section "GitLab" Database config exists? ... [32myes[0m All migrations up? ... [32myes[0m Database contains orphaned GroupMembers? ... [32mno[0m GitLab config exists? ... [32myes[0m GitLab config up to date? ... [32myes[0m Log directory writable? ... [32myes[0m Tmp directory writable? ... [32myes[0m Uploads directory exists? ... [32myes[0m Uploads directory has correct permissions? ... [32myes[0m Uploads directory tmp has correct permissions? ... [35mskipped (no tmp uploads folder yet)[0m Init script exists? ... [31mno[0m [34m Try fixing it:[0m Install the init script [34m For more information see:[0m doc/install/installation.md in section "Install Init Script" [31m Please fix the error above and rerun the checks.[0m Init script up-to-date? ... [35mcan't check because of previous errors[0m Projects have namespace: ... [33m2[0m/[33m1[0m ... [32myes[0m [33m30[0m/[33m4[0m ... [32myes[0m [33m2[0m/[33m5[0m ... [32myes[0m [33m13[0m/[33m7[0m ... [32myes[0m [33m4[0m/[33m8[0m ... [32myes[0m [33m17[0m/[33m10[0m ... [32myes[0m [33m17[0m/[33m12[0m ... [32myes[0m [33m17[0m/[33m13[0m ... [32myes[0m [33m10[0m/[33m14[0m ... [32myes[0m [33m21[0m/[33m16[0m ... [32myes[0m [33m13[0m/[33m18[0m ... [32myes[0m [33m17[0m/[33m19[0m ... [32myes[0m [33m24[0m/[33m20[0m ... [32myes[0m [33m2[0m/[33m22[0m ... [32myes[0m [33m27[0m/[33m25[0m ... [32myes[0m [33m27[0m/[33m26[0m ... [32myes[0m [33m17[0m/[33m28[0m ... [32myes[0m [33m30[0m/[33m29[0m ... [32myes[0m [33m30[0m/[33m30[0m ... [32myes[0m [33m4[0m/[33m31[0m ... [32myes[0m [33m33[0m/[33m32[0m ... [32myes[0m [33m36[0m/[33m33[0m ... [32myes[0m [33m12[0m/[33m34[0m ... [32myes[0m [33m17[0m/[33m36[0m ... [32myes[0m [33m2[0m/[33m37[0m ... [32myes[0m [33m4[0m/[33m38[0m ... [32myes[0m [33m17[0m/[33m39[0m ... [32myes[0m [33m17[0m/[33m40[0m ... [32myes[0m [33m43[0m/[33m41[0m ... [32myes[0m [33m45[0m/[33m43[0m ... [32myes[0m [33m45[0m/[33m45[0m ... [32myes[0m [33m45[0m/[33m46[0m ... [32myes[0m [33m47[0m/[33m50[0m ... [32myes[0m [33m21[0m/[33m52[0m ... [32myes[0m [33m38[0m/[33m54[0m ... [32myes[0m [33m14[0m/[33m56[0m ... [32myes[0m [33m4[0m/[33m57[0m ... [32myes[0m [33m55[0m/[33m58[0m ... [32myes[0m [33m57[0m/[33m59[0m ... [32myes[0m [33m24[0m/[33m60[0m ... [32myes[0m [33m59[0m/[33m63[0m ... [32myes[0m [33m59[0m/[33m64[0m ... [32myes[0m [33m59[0m/[33m65[0m ... [32myes[0m [33m59[0m/[33m66[0m ... [32myes[0m [33m59[0m/[33m67[0m ... [32myes[0m [33m59[0m/[33m68[0m ... [32myes[0m [33m59[0m/[33m69[0m ... [32myes[0m [33m59[0m/[33m70[0m ... [32myes[0m [33m59[0m/[33m71[0m ... [32myes[0m [33m59[0m/[33m72[0m ... [32myes[0m [33m59[0m/[33m73[0m ... [32myes[0m [33m59[0m/[33m74[0m ... [32myes[0m [33m47[0m/[33m75[0m ... [32myes[0m [33m61[0m/[33m76[0m ... [32myes[0m [33m17[0m/[33m77[0m ... [32myes[0m [33m62[0m/[33m78[0m ... [32myes[0m [33m24[0m/[33m79[0m ... [32myes[0m [33m24[0m/[33m80[0m ... [32myes[0m [33m17[0m/[33m81[0m ... [32myes[0m [33m12[0m/[33m82[0m ... [32myes[0m [33m4[0m/[33m83[0m ... [32myes[0m [33m24[0m/[33m84[0m ... [32myes[0m [33m69[0m/[33m85[0m ... [32myes[0m [33m47[0m/[33m86[0m ... [32myes[0m [33m68[0m/[33m87[0m ... [32myes[0m [33m18[0m/[33m88[0m ... [32myes[0m [33m4[0m/[33m89[0m ... [32myes[0m [33m2[0m/[33m91[0m ... [32myes[0m [33m12[0m/[33m92[0m ... [32myes[0m [33m51[0m/[33m93[0m ... [32myes[0m [33m12[0m/[33m94[0m ... [32myes[0m [33m12[0m/[33m95[0m ... [32myes[0m [33m17[0m/[33m96[0m ... [32myes[0m [33m59[0m/[33m97[0m ... [32myes[0m [33m59[0m/[33m98[0m ... [32myes[0m [33m12[0m/[33m99[0m ... [32myes[0m [33m24[0m/[33m100[0m ... [32myes[0m [33m51[0m/[33m104[0m ... [32myes[0m [33m62[0m/[33m105[0m ... [32myes[0m [33m41[0m/[33m106[0m ... [32myes[0m [33m83[0m/[33m107[0m ... [32myes[0m [33m24[0m/[33m108[0m ... [32myes[0m [33m62[0m/[33m109[0m ... [32myes[0m [33m62[0m/[33m110[0m ... [32myes[0m [33m21[0m/[33m111[0m ... [32myes[0m [33m21[0m/[33m112[0m ... [32myes[0m [33m62[0m/[33m113[0m ... [32myes[0m [33m84[0m/[33m115[0m ... [32myes[0m [33m84[0m/[33m116[0m ... [32myes[0m [33m84[0m/[33m117[0m ... [32myes[0m [33m18[0m/[33m118[0m ... [32myes[0m [33m14[0m/[33m119[0m ... [32myes[0m [33m14[0m/[33m120[0m ... [32myes[0m [33m14[0m/[33m121[0m ... [32myes[0m [33m17[0m/[33m122[0m ... [32myes[0m [33m21[0m/[33m123[0m ... [32myes[0m [33m18[0m/[33m124[0m ... [32myes[0m [33m17[0m/[33m125[0m ... [32myes[0m Redis version >= 2.8.0? ... [31mno[0m [34m Try fixing it:[0m Update your redis server to a version >= 2.8.0 [34m For more information see:[0m gitlab-public-wiki/wiki/Trouble-Shooting-Guide in section sidekiq [31m Please fix the error above and rerun the checks.[0m Ruby version >= 2.5.3 ? ... [32myes (2.6.5)[0m Git version >= 2.22.0 ? ... [31mno[0m Your git bin path is "/usr/bin/git" [34m Try fixing it:[0m Update your git to a version >= 2.22.0 from Unknown [31m Please fix the error above and rerun the checks.[0m Git user has default SSH configuration? ... [32myes[0m Active users: ... [32m54[0m Is authorized keys file accessible? ... [35mskipped (authorized keys not enabled)[0m
Checking [33mGitLab App[0m ... [32mFinished[0m
Checking [33mGitLab subtasks[0m ... [32mFinished[0m