-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Merging core PRs doesn't cancel PR builds #3807
Comments
Hello @NotMyFault , it is a pipeline setting (I believe a PR is needed on Core then) as the job configuration only (and already) enable the "Abort Build" option for "Orphan Item strategy". For plugin, this is this property: https://github.com/jenkins-infra/pipeline-library/blob/ccc2b0a6ab573bb2381047aac9b495e8ad6257bb/vars/buildPlugin.groovy#L7 |
It's weird: the behavior is already set on the |
And the configuration of https://ci.jenkins.io/job/Core/job/jenkins/ is below: => when a PR is merged, a webhook is sent to ci.jenkins.io, which triggers a "Scan Repository Now" detecting the PR's reference branch is gone and consider it as "Orphaned". But there is something weird going on: I see Prs marked as "removed" but should be deleted: For instance: jenkinsci/jenkins#8669 Gotta check deeper |
After triggering a manual scanc, these PRs have been GC-ed. I wonder if the GC of orphaned build isn't defered or async: that would explain. |
🤔 Checked in datadog: no error on the time when the PR as merged. Last recorded log line is:
I'm not sure if the "Scan Repository Logs" are collected though |
Ping @NotMyFault do you have more details to help us, it is hard to analyse the issue here (we're not sure of the exact behavior you had) |
I didn't merge any PRs with a running build yet, but I'll look out for one. |
@dduportal "disable concurrent builds" will prevent two parallel builds on the master/main branch after merging, but will it abort the PR build? |
Nope, it is unrelated. In the context of a Multi-branch pipeline, the mechanism in charge of aborting the PR build is the "Orphan Item Strategy": when the PR is merged, a webhook is sent to Jenkins which trigger a repository scan. Then Jenkins detects the PR's source branch reference is gone and decides to remove the associated pipeline (e.g. the Pipeline sub-job from the "PR" tab) => hence the screenshot above about this strategy showing Jenkins should abort the build immediately when detecting the change. However, this is not a synchronous process so there might be multiple elements slowing down the detection:
|
I'm gonna close this issue as we do not have an immediate reproduction, so the infra team may focus on something else. Please feel free to reopen with screenshots (recordings), logs etc. if you see this behavior again on ci.jenkins.io. |
Service(s)
ci.jenkins.io
Summary
ref jenkinsci/jenkins#8659 (comment) and the couple of messaged below.
Apparently that's the case for plugins, but should be the case for core PRs too, especially when advancing a merge could save use a few hours of resources.
Reproduction steps
No response
The text was updated successfully, but these errors were encountered: