Skip to content

Conversation

tidalf
Copy link

@tidalf tidalf commented Jun 29, 2023

This fixes this issue #280 for our setup.

Not sure it's fine as is, or if it'd be better to try to retrieve the settings of the project.

@tidalf tidalf force-pushed the fix/mr-ref-is-different-when-mr-result-option-is-enabled-on-the-project branch from faeb579 to 9e9b679 Compare June 30, 2023 09:52
@tidalf tidalf changed the title handle both ref name syntax for mr pipelines api Handle specific ref name during api calls for mr pipelines from project with merge results/trains enabled Jul 6, 2023
@Art3mK
Copy link

Art3mK commented Oct 30, 2023

@mvisonneau any chance for this to be merged? 🙏 I have the same problem, latest gcpe image can't find MR pipeline for the repo with merge trains enabled. Works fine for repos without merge trains.

@kalw
Copy link

kalw commented Nov 10, 2023

Yes ! Would be lovely if @mvisonneau can have a look :)

@mj3c
Copy link

mj3c commented Dec 27, 2023

I've just been battling with this issue for quite a while and stumbled into this PR. So this proposal would work for all MRs that have at least 1 regular MR pipeline and 1 MR results pipeline. There's a regex which filters the discovered refs before execution ever reaches the changes in this proposal. Here it is:

mergeRequestRegexp string = `^((\d+)|refs/merge-requests/(\d+)/head)$`

This means that only MR refs with /head (regular MR pipelines) are considered. Meaning that if you have enabled MR result pipelines, all the refs will be /merge (with the exception of when there are conflicts, as stated in gitlab docs, search for "conflict").

Here's a git patch in another thread that works for us. This one ensures that both the regular MR pipelines and MR results pipelines are gathered and exported: #534 (comment)

@sebglon
Copy link

sebglon commented Nov 26, 2024

We have the same issue and want to use this Fix.
have you plan to merge it?

@tolikkostin
Copy link

Any updates? I would like to collect metrics for train MRs too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants