Tinder / bazel-diff

Performs Bazel Target Diffing between two revisions in Git, allowing for Test Target Selection and Selective Building
Other
397 stars 59 forks source link

throw a BazelQueryException on a failed bazel query #122

Closed lucylura closed 2 years ago

lucylura commented 2 years ago

currently, a failed bazel query doesn't stop bazel-diff the query runs and bazel-diff exits with code 0 when complete this occurs with or without --keep_going="false"

to reproduce: make a syntax error in BUILD.bazel file and generate-hashes on the workspace

this adds a new exception which is thrown if bazel query exits with non-zero exit code

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

Malinskiy commented 2 years ago

I believe failed query should fail the run now: https://github.com/Tinder/bazel-diff/blob/master/cli/src/main/kotlin/com/bazel_diff/bazel/BazelQueryService.kt#L60