-
Bug
-
Resolution: Fixed
-
Medium
-
7.21.4, 8.9.7
-
7
-
Severity 2 - Major
-
23
-
Issue Summary
When a user creates a PR between the fork and the main repository, a build is triggered by Bitbucket towards Bamboo. The build's status is returned to Bitbucket, but it isn't visible in the PR's build or overview tab.
This is reproducible on Data Center: (yes)
Steps to Reproduce
- Create a fresh repository in Bitbucket with a master branch and push some commits to the master branch.
- Create another branch(say branch1) and push some changes to this branch.
- Create a fork of the newly created repository in personal space.
- Create a new plan in bamboo and Link the repository.
- While configuring the plan, navigate to the Branches tab select When a pull request is created, and check Forked repositories are allowed under the Create plan branch tab.
- Open a pull request from branch1 of the fork repository to the master branch of the main repository in Bitbucket.
Expected Results
The build status should be reflected in the overview, builds tab of the PR.
Actual Results
The status of the build is not reflected in the overview and builds page of the PR.
On checking the bb_build_status table, build details are present but with ref refs/heads/pull-requests/<PR-ID>/from while bitbucket looks for a build status whose ref is refs/heads/<branch-name>, and because of this no build status is displayed in the GUI.
2024-01-04 12:53:21,043 DEBUG [http-nio-7991-exec-9] admin @QAKDCXx773x2957x4 lrfkd1 10.211.55.2 "GET /rest/ui/latest/projects/PRO1/repos/repo5/pull-requests/13/build-summaries HTTP/1.1" org.hibernate.SQL select this_.commit_id as y0_, this_.state as y1_, count(*) as y2_, this_.commit_id as y3_, this_.state as y4_ from bb_build_status this_ where (this_.commit_id in (?) and (this_.repository_id is null or this_.repository_id=? or this_.repository_id=?) and (this_.ref=? or this_.ref is null)) group by this_.commit_id, this_.state 2024-01-04 12:53:21,043 TRACE [http-nio-7991-exec-9] admin @QAKDCXx773x2957x4 lrfkd1 10.211.55.2 "GET /rest/ui/latest/projects/PRO1/repos/repo5/pull-requests/13/build-summaries HTTP/1.1" o.h.type.descriptor.sql.BasicBinder binding parameter [1] as [VARCHAR] - [a04be7d28a901c880894db40008342e353bd1f3c] 2024-01-04 12:53:21,043 TRACE [http-nio-7991-exec-9] admin @QAKDCXx773x2957x4 lrfkd1 10.211.55.2 "GET /rest/ui/latest/projects/PRO1/repos/repo5/pull-requests/13/build-summaries HTTP/1.1" o.h.type.descriptor.sql.BasicBinder binding parameter [2] as [INTEGER] - [12] 2024-01-04 12:53:21,043 TRACE [http-nio-7991-exec-9] admin @QAKDCXx773x2957x4 lrfkd1 10.211.55.2 "GET /rest/ui/latest/projects/PRO1/repos/repo5/pull-requests/13/build-summaries HTTP/1.1" o.h.type.descriptor.sql.BasicBinder binding parameter [3] as [INTEGER] - [13] 2024-01-04 12:53:21,043 TRACE [http-nio-7991-exec-9] admin @QAKDCXx773x2957x4 lrfkd1 10.211.55.2 "GET /rest/ui/latest/projects/PRO1/repos/repo5/pull-requests/13/build-summaries HTTP/1.1" o.h.type.descriptor.sql.BasicBinder binding parameter [4] as [VARCHAR] - [refs/heads/branch1]
select id,commit_id,build_key,created_date,parent,ref,repository_id from bb_build_status;
id | commit_id | build_key | created_date | parent | ref | repository_id |
53 | a04be7d28a901c880894db40008342e353bd1f3c | BAM-BAM59 | 2024-01-04 12:52:11.574000 | BAM-BAM5 | refs/heads/pull-requests/13/from | 13 |
Workaround
Currently, there is no known workaround for this behavior. A workaround will be added here when available
- relates to
-
BSERV-19663 Pull request cannot be merged (forked->parent) due to "Minimum successful builds" is not fulfilled, despite successful build in bamboo.
-
- Closed
-