Skip to content

Pipeline widget in MR sometimes is taken from regular pipelines not from MR pipelines

Summary

Sometimes in a merge request, the pipeline widget is shown related to the regular push pipeline, but not to the merge request pipeline. This is crucial since we've got special jobs only for MR which should be triggered manually from MR.

Steps to reproduce

We've got the following blocks defining the relationship between the job and pipelines

only:
    refs:
      - merge_requests
      - branches

and

only:
    refs:
      - merge_requests
      - /^release\/.*$/

So, some jobs should be triggered for all branches AND for MR pipelines. Some jobs should be triggered for every MR and for some branches (release branches). Hence some jobs are triggered twice at the same time.

But we expect to see the pipeline widget with the result taken from the MR pipeline only, no matter what the order of their triggering is.

What is the current bug behavior?

We see the widget taken for a regular pipeline

What is the expected correct behavior?

We should always see the result from MR pipeline

Relevant logs and/or screenshots

Case 1

MR pipeline is triggered before the regular pipeline

Screenshot_2019-07-31_at_15.29.35

Here we have a widget with a regular pipeline

Screenshot_2019-07-31_at_16.27.42

Case 2

The order seems ok

Screenshot_2019-08-01_at_11.18.54

But still, the regular pipeline is in the widget

Screenshot_2019-08-01_at_11.23.51

I think it's the external build causing that behavior since it was triggered after the MR proceeded.

Additional info

I've created an issue about the same strange behavior in EE repo: https://gitlab.com/gitlab-org/gitlab-ee/issues/13189