You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What Operating System are you using (both controller, and any agents involved in the problem)?
Rocky Linux 8.10 with Docker
Reproduction steps
Create a Pull Request in Bitbucket (or reuse an existing PR)
Checkout the Pull Request's branch and create a new branch on top of it
Without adding any extra commits, push the branch to remote
Expected Results
No extra builds should be visible (blocking) on the existing PR in Bitbucket.
Actual Results
An extra build appears on the PR based on the build of the other branch. On top of that, if the branch is then deleted while the build is ongoing, the build status in Bitbucket remains blocked on "In Progress" and we cannot merge the PR.
jroch
changed the title
Incorrect build notification status sent when 2 branches point to the same commit
Build status linked to unrelated Pull Request when 2 branches point to the same commit
Sep 2, 2024
I understand from jenkinsci/atlassian-bitbucket-server-integration-plugin#401 (comment) that, if you used the newer build status API and provided the optional ref parameter, then Bitbucket Server would hide the build status from pull requests that don't involve the specified ref.
#621 and #778 request using the newer build status API.
On top of that, if the branch is then deleted while the build is ongoing, the build status in Bitbucket remains blocked on "In Progress" and we cannot merge the PR.
That would have to be fixed separately. It does not depend on which build-status REST API is used. IIRC the problem is that, when the branch is deleted, Jenkins switches the job to NullSCM, and then this plugin will no longer know where it should send the build status when the build finishes. It could be fixed by making this plugin save that information when it sends the build-in-progress status.
As far as I know Bitbucket associates the build status information to the commit id. For one or two years I had opened a Bitbucket issue for that but sadly it wasn't seen as a problem.
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Rocky Linux 8.10 with Docker
Reproduction steps
Expected Results
No extra builds should be visible (blocking) on the existing PR in Bitbucket.
Actual Results
An extra build appears on the PR based on the build of the other branch. On top of that, if the branch is then deleted while the build is ongoing, the build status in Bitbucket remains blocked on "In Progress" and we cannot merge the PR.
Anything else?
I have also noticed that the POST operation used by the plugin here has been officially deprecated: https://developer.atlassian.com/server/bitbucket/rest/v900/api-group-deprecated/#api-build-status-latest-commits-commitid-post
Maybe the way the key property is retrieved here is wrong ?
Are you interested in contributing a fix?
No response
The text was updated successfully, but these errors were encountered: