Skip to content

[Bug]: GitLab merge requests show the whole pipeline as one check #13431

Description

@antony-bouyon

Area

apps/server

Steps to reproduce

  1. Connect a GitLab project whose merge request pipelines have more than one job.
  2. Open a merge request while its pipeline is running, then again after a job fails.
  3. Look at the checks summary on the merge request's Summary tab.

Expected behavior

One check per CI job, like GitHub pull requests get, so a failed or running check names the job and links to it.

Actual behavior

The whole pipeline shows up as a single check called "Pipeline". While it runs, the header reads "1 of 1 running". When it fails, you can't tell which job failed without opening GitLab.

It can also show a pass that isn't one. A trigger job without strategy: depend succeeds as soon as it starts its child pipeline. If that child pipeline then fails, the parent pipeline stays green, and so does the single check.

The cause is toChecks in apps/server/src/pullRequest/gitLabMergeRequestJson.ts. It maps the merge request's head_pipeline to one check and never reads the jobs. The comment above it says GitLab has no per-job list for a merge request. The merge request endpoint doesn't have one, but GET /projects/:id/pipelines/:pipeline_id/jobs and .../bridges do, and the second one reports each child pipeline's own status.

Impact

Minor bug or occasional failure

Version or commit

main @ e67abcf

Environment

Linux, desktop app, GitLab via glab

Workaround

Click through to the pipeline on GitLab.

Fix

I have a fix working locally and can open a PR. The merge request detail reads the head pipeline's jobs and trigger jobs, and shows one check per job. A trigger job takes the status and link of the pipeline it started. If either read fails or returns a full page, it falls back to today's single "Pipeline" check.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions