Pipeline links on commits in MR's doesn't work.
Summary
The page linked to by the pipeline icon on commits in MR's is loading forever. The pipeline link points to the commit and adds "pipelines?ref=[branch name here]" at the end of the URL which doesn't seem right. It should link to the pipeline section of the repo.
Steps to reproduce
- Go to a Merge Request. The URL should end with something like this: [name of repo]/-/merge_requests/[MR number]
- Go to Commits, located right under the MR's title. Adds "/commits" at the end of the URL.
- Press any Pipeline icon, located to the left of the commit's SHA. Note: The pipeline icon is only visible if the repo has a working config for CI.
Example Project
Here is an example of a MR with a commit that has triggered a pipeline: !30798 (commits)
This is the URL that the pipeline icon points to that results in this bug: edaf00d1
What is the current bug behavior?
That the page is loading forever and no pipeline info is shown.
What is the expected correct behavior?
You should be in a pipeline page under the CI / CD section and see the pipeline that was triggered by the commit.
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
We have this problem with self-hosted (omnibus) version 12.9.4-ee as well.
Collapse replies If you have a valid license please open a ticket with Support via https://support.gitlab.com/hc/en-us/requests/new so that we can prioritize debugging this and updating this issue accordingly.
- 🤖 GitLab Bot 🤖 mentioned in issue gitlab-org/quality/triage-reports#104 (closed)
mentioned in issue gitlab-org/quality/triage-reports#104 (closed)
- Rehab added customer pipeline reproduced on GitLab.com labels
added customer pipeline reproduced on GitLab.com labels
Related to #9013 (closed)
Edited by Rehab- Rehab closed
closed
- Author
@rhassanein I'm not sure this is the same bug. In my example (edaf00d1) it doesn't show a pipeline row under the merge request spinner and no pipeline column next to the "changes" column. Which I think it should since when visiting the column "pipelines" in the MR it says that this commit triggered a pipeline that passed. Link: !30798 (merged)
Collapse replies - Developer
@edfast sorry for taking so long to get to this.
That is indeed weird.
The Commits tab is told "this commit has a pipeline" thus, it creates a link. But on the Commits page, it doesn't have a commit. Hence the bug.
Paging @m_gill @rickywiens for further info since this seems to stem from some inconsistency on the BE..
Commits page: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/views/projects/commit/_ci_menu.html.haml
- any_pipelines = @commit.present(current_user: current_user).any_pipelines?
MR Commits tab: (html rendered on the server)
- if commit_status = render_commit_status(commit, commit_status, ref: ref)
https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/views/projects/commits/_commit.html.haml#L54
- Contributor
Hi @andr3 I'm no expert but I did some digging around for fun anyway to help get me used to the code. It seems like you're right in that the condition for displaying that badge and for loading pipelines on the commit tab is different.
For the commits page the condition for loading is as you've identified above:
- any_pipelines = @commit.present(current_user: current_user).any_pipelines?
However on the MR Commits tab, the condition for loading the pipeline icon is:
- if commit_status
Which resolves to:
- commit_status = commit.status_for(ref)
Which resolves to:
def status_for(ref) return unless can?(current_user, :read_commit_status, commit.project) commit.latest_pipeline(ref)&.detailed_status(current_user) end
ref in the MR Commits tab is referring to:
- ref = local_assigns.fetch(:ref) { merge_request&.source_branch }
It's unclear to me why those two would resolve differently.
Someone who is more familiar with our commits page might be able to help more, though. Let me know if there's anything more I can do to help.
- Rehab reopened
reopened
- Rehab added devopscreate frontend groupsource code merge requests severity3 typebug labels
added devopscreate frontend groupsource code merge requests severity3 typebug labels
- 🤖 GitLab Bot 🤖 mentioned in issue #218187 (closed)
mentioned in issue #218187 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #218929 (closed)
mentioned in issue #218929 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #219682 (closed)
mentioned in issue #219682 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #220716 (closed)
mentioned in issue #220716 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #222216 (closed)
mentioned in issue #222216 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #223635 (closed)
mentioned in issue #223635 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #225116 (closed)
mentioned in issue #225116 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #226943 (closed)
mentioned in issue #226943 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #230641 (closed)
mentioned in issue #230641 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #232363 (closed)
mentioned in issue #232363 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #233318 (closed)
mentioned in issue #233318 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #235073 (closed)
mentioned in issue #235073 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #237811 (closed)
mentioned in issue #237811 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #240842 (closed)
mentioned in issue #240842 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #243455 (closed)
mentioned in issue #243455 (closed)
- 🤖 GitLab Bot 🤖 added sectiondev label
added sectiondev label
- 🤖 GitLab Bot 🤖 mentioned in issue #246446 (closed)
mentioned in issue #246446 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #249048 (closed)
mentioned in issue #249048 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #254149 (closed)
mentioned in issue #254149 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #257775 (closed)
mentioned in issue #257775 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue #261982 (closed)
mentioned in issue #261982 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue gitlab-org/quality/triage-reports#476 (closed)
mentioned in issue gitlab-org/quality/triage-reports#476 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue gitlab-org/quality/triage-reports#535 (closed)
mentioned in issue gitlab-org/quality/triage-reports#535 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue gitlab-org/quality/triage-reports#611 (closed)
mentioned in issue gitlab-org/quality/triage-reports#611 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue gitlab-org/quality/triage-reports#676 (closed)
mentioned in issue gitlab-org/quality/triage-reports#676 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue gitlab-org/quality/triage-reports#709 (closed)
mentioned in issue gitlab-org/quality/triage-reports#709 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue gitlab-org/quality/triage-reports#799 (closed)
mentioned in issue gitlab-org/quality/triage-reports#799 (closed)
- Phil Hughes added backend label and removed frontend label
- Maintainer
Setting label(s) Category:Source Code Management based on groupsource code.
- 🤖 GitLab Bot 🤖 added Category:Source Code Management label
added Category:Source Code Management label
- 🤖 GitLab Bot 🤖 mentioned in issue gitlab-org/quality/triage-reports#887 (closed)
mentioned in issue gitlab-org/quality/triage-reports#887 (closed)
- Nick Thomas removed Category:Source Code Management label
removed Category:Source Code Management label
- Nick Thomas added Category:Code Review Workflow groupcode review labels and removed groupsource code label
added Category:Code Review Workflow groupcode review labels and removed groupsource code label
- 🤖 GitLab Bot 🤖 mentioned in issue gitlab-org/quality/triage-reports#929 (closed)
mentioned in issue gitlab-org/quality/triage-reports#929 (closed)
- 🤖 GitLab Bot 🤖 mentioned in issue gitlab-org/quality/triage-reports#1019 (closed)
mentioned in issue gitlab-org/quality/triage-reports#1019 (closed)
- Michelle Gill changed milestone to %Backlog
changed milestone to %Backlog
- Michelle Gill added priority3 label
added priority3 label
- 🤖 GitLab Bot 🤖 added [deprecated] Accepting merge requests label
added [deprecated] Accepting merge requests label
- 🤖 GitLab Bot 🤖 added vintage label
added vintage label
- 🤖 GitLab Bot 🤖 added SLOMissed label
added SLOMissed label
- Amy Qualls added twtriaged label
added twtriaged label