Skip to content

Commit

Permalink
bisect: always override oldCommit to the merge base commit (#633)
Browse files Browse the repository at this point in the history
This would resolve branch name like `release-8.0.0rc2` to an actual commit hash, which is then a valid Bazel version for Bazelisk. 

This avoids error like:
```
# bazel --bisect=release-8.0.0rc2..e18aad1be363fe40bad2cc67462a6389f381096b test //...


--- Getting the list of commits between release-8.0.0rc2 and e18aad1be363fe40bad2cc67462a6389f381096b

Found 54 commits between (release-8.0.0rc2, e18aad1be363fe40bad2cc67462a6389f381096b]


--- Verifying if the given good Bazel commit (release-8.0.0rc2) is actually good

2024/11/18 12:58:03 could not run Bazel: could not download Bazel: could not resolve the version 'release-8.0.0rc2' to an actual version number: Invalid version 'release-8.0.0rc2'
```
  • Loading branch information
meteorcloudy authored Nov 22, 2024
1 parent 2d9b590 commit e812979
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -824,9 +824,9 @@ func getBazelCommitsBetween(oldCommit string, newCommit string, config config.Co
}

mergeBaseCommit := compResp.MergeBaseCommit.SHA
oldCommit = mergeBaseCommit
if mergeBaseCommit != compResp.BaseCommit.SHA {
fmt.Printf("The old Bazel commit is not an ancestor of the new Bazel commit, overriding the old Bazel commit to the merge base commit %s\n", mergeBaseCommit)
oldCommit = mergeBaseCommit
}

for _, commit := range compResp.Commits {
Expand Down

0 comments on commit e812979

Please sign in to comment.