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
Additional builds triggered for commit even if current commit is building #27
Comments
Yes. I've noticed this too. I'm planning on adding a check to prevent builds being scheduled if one is already running. Thanks for reporting. |
Workaround: Slow down your cron. Thx mjdetullio :) |
@timols any progress on this one? If not then I might be able to help out with this if you can point me in the right direction. Thanks. |
Currently the plugin relies on GitLab's API to tell if a MR is building or was built. When the build triggered comment is disabled, the last comment left will still be from before the last commit. You have to either:
|
@jchristi pretty much what @mjdetullio said. The plugin was implemented using the comments to keep track of the state of the build in certain circumstances, so if the messages are disabled, then the plugin will struggle to not re-build.
Yep, the challenge lies in adjusting the build trigger to look at all other builds. |
I've just created #107 that solved this issue for us |
@davidkovaccs the fix works. thx. |
Basically, there is a race condition between your job's build time and the merge request builder cron setting. The race causes the same commit hash to be built twice or even several times.
Setup:
Result:
Updating a merge request with a new commit or amended commit should still work as intended and trigger a new build.
Workaround: Slow down your cron!
The text was updated successfully, but these errors were encountered: