-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitLab: Two pipelines per MR #5743
Comments
Keeping debug logs would help with this, especially for the job that creates the extra/incorrect pipeline. Also, once such an MR exists it would be very good to query the API manually to get a complete list of its checks. I definitely don't rule out a Renovate bug here. |
@rarkins I added the debug logs (is it enough?). Note that the case I observed was even more strange. It created a single pipeline for the stability-days job, then created the normal pipelines. |
i think this is a gitlab bug, because renovate puts the status check on commits, not on pipelines. Maybe something is triggering two pipelines on a pr update? |
I have the exact same issue. Debug logs are permanently enabled but they don't seem to log anything regarding pipelines for stability days. |
I may be something to do with a recent GitLab upgrade as for a while |
https://gitlab.com/gitlab-org/gitlab/-/issues/14064 I think this is a renovate bug? |
https://docs.gitlab.com/ee/api/commits.html#post-the-build-status-to-a-commit On this line https://github.com/renovatebot/renovate/blob/master/lib/platform/gitlab/index.ts#L655, we need to pass |
I'm still able to reproduce this issue on GitLab.com. If it's a race condition (as theorized in the linked PR before it was closed), can renovate wait for some condition to be true before attempting to create the status check? As it stands, this makes auto-merge entirely useless because there's a nonzero chance that code will be merged without passing our actual pipeline, just because the update has existed for X days. This also means that the stability-days feature doesn't work as intended - if the actual pipeline is created after the stability-days pipeline, the stability-days pipeline will have no effect on whether the MR can be merged. The original gitlab issue that this was blamed on was closed/fixed nearly a year ago, so this is presumably either a renovate issue or a different gitlab issue. |
@andrewgies17 please provide a public reproduction repo. As I noted above, this seems to be a gitlab bug. |
I was unable to replicate on gitlab.com so decided to remove stability days to prevent the issue and avoid wasting any further time on it. If you have a public reproducer please share it @andrewgies17 ! |
@andrewgies17 in my instance I use an external CI pipeline (Jenkins) which reports to GitLab. The Jenkins jobs sometimes take a while to start and if the stability days status check gets applied first, the MR can be merged before the Jenkins job has started. It would be useful if there was an option to only apply the stability days status check if there is already a passing pipeline. |
What Renovate type are you using?
We are using the Docker version (
renovate/renovate:19
) on https://gitlab.com. It is scheduled to run all 2 hours.Describe the bug
We configured renovate with
stabilityDays: 3
. In GitLab, this creates a new job, which makes the MR wait for the specified time. So far, all good.However, sporadically the

renovate/stability-days
job will be placed on a new pipeline instead of the existing pipeline. Note that two pipelines exist instead of one. The newer pipeline with only one job is therenovate/stability-days
job.Usually, the

renovate/stability-days
job will be placed correctly in the existing pipeline (the job on the far right in this screenshot):Creating two pipelines has a huge impact: In the merge request, only the most recent pipeline is checked. So if our testing-pipeline fails, the merge request can still be merged (because the
renovate/stability-days
job passes).Did you see anything helpful in debug logs?
Debug-Logs of a case:
Note: this debug case is special, the

renovate/stability-days
job was created before the actual jobs:To Reproduce
Since this only happens sporadically, it is hard to exactly reproduce this problem. Maybe it is a problem of GitLab...
Additional context
The problem happens for some merge request, while others work correctly in the same repository. Of course, disabling
stabilityDays
would prevent this problem, since the additional job wouldn't be created.The text was updated successfully, but these errors were encountered: