-
Notifications
You must be signed in to change notification settings - Fork 353
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
Option 'disableConcurrentBuilds(abortPrevious: true)' works as not expected with Bitbucket notifications #768
Comments
I am affected also. |
I think I have encountered this. The issue is ambiguous implementation in Bitbucket Branch Source plugin by not using a unique enough key. See my fork. In my opinion, build.getParent().getFullName(); does not cut it and should just use the URL of the build instead. The system should have multiple build awareness from the start or we will end up fighting Jenkins a good portion of the time. |
@mdealer Does your fix work well enough to be created as a PR? Affected by this issue as well and would like to see a fix. |
If a build of a pull request fails a test because of some transient error, and it is then replayed and succeeds, I'd want the new build status to overwrite the original one so that the earlier error won't hold up the PR merge. If you use the URL of the build as the key, then how is this going to work? |
Have been using it for over a year now, but you need to be aware of the below.
I find the current implementation unnecessarily ambiguous. Bitbucket keeps track of all the builds, but somehow various UI parts display just one build but then the PR shows multiple builds of the last commit. This is confusing. The old plugin behavior is useful in some scenarios, but for Jenkins it is a fallacy - Jenkins runs builds in parallel and the status updates are not guaranteed to be in order. Both sides can be improved, but there are logical holes in the usability. Some configuration would be nice. |
I've now run into this as well. :-( |
#906 handle correctly the abort result, so you interrupted build will result in failed or cancelled |
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Controller - Linux - 5.10.130
Windows agent - Windows Server 2019 Datacenter
Linux agent - Linux - 5.10.130
Reproduction steps
Expected Results
The Official Jenkins documentation mentions that options { disableConcurrentBuilds(abortPrevious: true) } to abort the running one and start the new build, so it's expected start of a new build after previous one is aborted. In this case notification to Bitbucket about new build should have the status 'in pogress' and stays in this state while the build will be finished with some other status. In short, notification from previous build shouldn't overwrite a notification from a new build.
Actual Results
A new build starts before previous one is aborted and this behaviour affects notification to Bitbucket, becuase when the new build is started, the plugin 'bitbucket-branch-source-plugin' sents notification that the build in progess, then during some time previous build is aborted and overwrite current notification state to 'SUCCESS'.
Anything else?
No response
The text was updated successfully, but these errors were encountered: