Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
Severity 3 - Minor
-
28
-
1
-
Description
Issue Summary
- When performing an API filtering query such as the one below against a PR build using the full commit hash, the API call fails to retrieve results:
https://api.bitbucket.org/2.0/repositories/{workspaceID}/{reposlug}/pipelines?target.commit.hash={fullcommithash}
- If the same query is performed using the full commit hash against a build that is unrelated to a PR, results are successfully returned
- To retrieve results for a PR build, the short version of the hash (12 characters) must be used which is inconsistent with other builds - it is not possible to use one type of commit hash across all types of Pipelines builds
- The root cause of this is that Pipelines uses the PR API to calculate commit hash value, which is shorter
- This is something that will need to be fixed due to future concerns about potential hash collisions
Steps to Reproduce
- Use the full commit hash when querying a PR build, the query fails to return results
- Using the short hash instead when querying a PR build, the query returns results
Expected Results
- It should not matter what kind of hash is used, results should be returned regardless of build type
Actual Results
- There is inconsistency when querying the API due to differences in hash calculation between build types
Workaround
- Currently, the only way to return results is to use long hash for non-PR builds and short hash for PR builds
Attachments
Issue Links
- is related to
-
BCLOUD-11415 Pull Request API should return full commit hash (BB-14633)
- Closed