-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 8.19.0, 9.0.0, 9.1.0, 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.6.0, 10.0.0, 10.2.0, 10.3.0
-
Component/s: Pull Request - Required Builds
-
1
-
Severity 3 - Minor
-
6
Issue Summary
The bundled Bitbucket Required Builds merge check performs build status lookup and streams pull request commits before checking whether any Required Builds conditions apply to the pull request.
Steps to Reproduce
- Enable profile logging for Bitbucket
- Create a PR for a sample repo
- Open the PR or call PR mergeability API for a pull request, for example:
GET /rest/api/1.0/projects/{projectKey}/repos/{repoSlug}/pull-requests/{prId}/merge - Observe that the Required Builds merge check still performs build-status search and PR commit streaming from the profiler logs
Example profiler pattern:
com.atlassian.bitbucket.server.bitbucket-build:specificRequiredBuildMergeCheck#preUpdate
void com.atlassian.bitbucket.pull.PullRequestService.streamCommits(...)
void com.atlassian.stash.internal.scm.git.mesh.RpcPullRequestClient.getCommits(...)
Expected Results
If no Required Builds conditions apply to the repository or pull request, the Required Builds merge check should not call build status search and stream PR commits.
Actual Results
The Required Builds merge check calls build status search first even when no Required Builds conditions are configured for a repo, performing unnecessary operations related to build status search and streaming commits.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available