test: reproducer for #392 (manual + test_suite targets in impacted output)#394
Open
tinder-maxwellelliott wants to merge 1 commit into
Open
test: reproducer for #392 (manual + test_suite targets in impacted output)#394tinder-maxwellelliott wants to merge 1 commit into
tinder-maxwellelliott wants to merge 1 commit into
Conversation
…tput) Issue #392 asks for a way to exclude `manual`-tagged targets and `test_suite` targets from `get-impacted-targets`. bazel-diff currently surfaces both like any other target, with no filter flag. This adds an E2E reproducer that pins the current behaviour: a new `manual_and_test_suite` fixture with a normal sh_test, a manual-tagged sh_test, and a test_suite wrapping the normal test. Editing the shared library source impacts all of them, and the test asserts that the manual target and the test_suite both appear in the default impacted-targets output. The test follows the same "pin current behaviour" pattern used for the source. When a filter flag (e.g. --excludeManual / --ignoredTargetLabels / a raw `except`-query segment) is added, these assertions are the lines that should flip. Refs #392 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
038a595 to
85e88c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reproducer for #392, which asks for a way to filter targets out of the
get-impacted-targetsoutput:manual-tagged targets — bazel-diff callsbazel queryunder the hood and surfaces manual targets like any other; there is no flag to drop them.test_suitetargets — changing a single test inside a suite reports the wrappingtest_suiteas impacted, with no way to exclude it.This is not a correctness bug — including these targets is the current, intended behaviour. The test pins that behaviour so that whenever a filter flag is added (the maintainer floated
--excludeManual/--ignoredTargetLabels/ a rawexcept-query segment in the issue thread), there's a concrete starting point documenting what the output looks like today.What's added
cli/src/test/resources/workspaces/manual_and_test_suite/with://:lib(sh_libraryoverlib.sh)//:regular_test(sh_test,deps = [:lib])//:manual_test(sh_test,deps = [:lib],tags = ["manual"])//:all_tests(test_suitewrapping:regular_test)testManualAndTestSuiteTargetsAppearInImpactedOutput_reproducerForIssue392: editslib.sh, runs thegenerate-hashes→get-impacted-targetsflow, and asserts that//:manual_testand//:all_testsboth appear in the default impacted-targets output.Follows the same "pin current behaviour" convention as the #365 reproducer so CI stays green and the behaviour is visible in source. When a filter flag lands, the
manual/test_suiteassertions are the lines that should flip.Gated on Bazel 8.6.0+ (or 9.0.1+) for the bzlmod
mod graphpath, matching the other bzlmod-based reproducers in this file.Test plan
Passes locally (Bazel 9.1.1 inner, 8.5.1 outer).
Refs #392
🤖 Generated with Claude Code