bazel-contrib / bazel-contrib/target-determinator
Honor "ignore-and-build-all" on compatibility query error
- Dominant language
- Go
- Stars
- 182
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
When the `-before-query-error-behavior ignore-and-build-all` option is set by the user, errors due to missing targets in the "before" commit should be ignored.
Currently, for Bazel versions between 7.0.0-pre.20230628.2 and 7.4.0, if the compatible target filtering fails due to any errors, target-determinator will exit with a non-zero status code without printer a list of targets.
This behavior can be reproduced with e.g. bazel 7.2.0 using a simple repository with a commit containing one target (`//:foo`) and another commit containing an additional target (`//:bar`), and then invoking TD with `target-determinator -before-query-error-behavior ignore-and-build-all -targets 'set(//:foo //:bar)' ` (invoked on the second commit).
Contributor guide
Research direction
Start with the target-determinator command path handling -before-query-error-behavior and reproduce the failure using Bazel 7.2.0, two commits, and the targets shown in the issue. Trace the compatibility query error for a target missing from the before commit. Done means ignore-and-build-all produces the expected target list and exits successfully instead of returning a non-zero status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, go
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100