-
Notifications
You must be signed in to change notification settings - Fork 343
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
cml pr trigger CI pipelines on GitLab #1023
Comments
Forgot to mention, this is the branch where I am trying to make use of |
If we are adding |
Reading from here: "Do not create a CI pipeline for the latest push. Only skips branch pipelines and not merge request pipelines." In my gitlab-ci I did not configure merge request pipelines, so it shouldn't be a problem. However, it could become an issue in some other cases. If this is really the case it would be worth to mention it in the documentation...? |
I am observing that the CI pipelines are skipped if I omit the |
That is a bug 🙈 :) I think I know the original thinking (don't skip-ci post-merge!) but said thinking is a bit flawed. I think we should also try to put |
Ok, happy to see that I got it right :) While waiting for your reply I was already checking into your further suggestion. In fact currently, even if the new branch does not activate the ci, once you merge it will! And that will create a new merge request etc. |
It doesn’t seem very difficult to make these couple of changes, shall I create a MR for you? :) |
That's typically intended behaviour (always test main). The workflow should be written to only create PRs from non-main branches (to avoid infinite PRs on
Potential work-arounds:
|
That would be awesome! 🙏 |
Here you go: #1035 PS: I would have preferred to first add tests and then make the changes, but I have never worked with js, and I don't have the time to figure out how to set up the development environment. |
Deterministic runs are of course desirable and should be the aim, but sometimes things go unexpectedly, so I would suggest no to rely on it, if it is not strictly necessary. Regarding 2: I don't know about github-actions token, sorry. But I am quite sure that the MR title would solve the issue in GitLab. As it does not break anything, I don't see why not going that away, rather than having to set up extra stuff. |
I take back my previous comment on MR title fixing the issue for GitLab :( |
Checking again in the cml code and the GitLab API reference. I believe that one could avoid the problem mentioned above by adding [skip ci] to the commit message when merging the merge request, see here. In practice, one could add the commit message with |
@francesco086 thanks for the contribution!!! ❤️ |
It was my pleasure :) thank you for the guidance! |
Following this message on Discord: https://discord.com/channels/485586884165107732/728693131557732403/978973993338044456
When the command
cml pr --merge dvc.lock
is executed as part of a GitLab CI pipeline, a new MR is created (as expected) and CI pipeline for that commit is triggered, which creates a new MR, etc. (loop of CI pipelines)If you look at the pipelines you will see several consecutive automatically triggered pipelines. Same if you look in the MRs (closed by me).
The text was updated successfully, but these errors were encountered: