Skip to content

Conversation

@bozaro
Copy link
Contributor

@bozaro bozaro commented Jan 31, 2024

Allow the use of the target kind (for example, cc_library, go_binary, go_test...) in the scrubbing matcher configuration.
This is useful, as different target kinds can have the same mnemonic.

@bozaro bozaro requested a review from a team as a code owner January 31, 2024 10:47
@github-actions github-actions bot added team-Remote-Exec Issues and PRs for the Execution (Remote) team awaiting-review PR is awaiting review from an assigned reviewer labels Jan 31, 2024
Copy link
Contributor

@tjgq tjgq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but please add tests in //src/test/java/com/google/devtools/build/lib/remote/ScrubberTest.java. You can use the test cases for label_regex (i.e., matchExactLabel, matchUnionLabel and matchWildcardLabel) as a starting point.

// Whether to match actions built for a tool configuration.
// The default is to match only actions built for non-tool configurations.
bool match_tools = 3;
// A regex matching the action target kind.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"A regex matching the rule kind of the action owner."

@tjgq tjgq added awaiting-user-response Awaiting a response from the author and removed awaiting-review PR is awaiting review from an assigned reviewer labels Feb 8, 2024
@bozaro bozaro force-pushed the scrubbing-target-kind branch from 7ba6343 to 3428a6f Compare February 9, 2024 09:08
@bozaro bozaro force-pushed the scrubbing-target-kind branch from 3428a6f to 88fbad5 Compare February 9, 2024 09:29
@bozaro bozaro requested a review from tjgq February 9, 2024 10:01
@tjgq
Copy link
Contributor

tjgq commented Feb 9, 2024

I don't believe the CI failures are related. Importing.

@tjgq
Copy link
Contributor

tjgq commented Feb 9, 2024

@bazel-io fork 7.1.0

@copybara-service copybara-service bot closed this in 4bcf855 Feb 9, 2024
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Feb 9, 2024
Add the target kind (e.g. java_library) to the scrubbing matcher configuration. This is useful because different kinds may use the same mnemonic, and specifying an explicit set of labels is labor-intensive and error-prone.

Closes bazelbuild#21151.

PiperOrigin-RevId: 605624773
Change-Id: Ib5748ca2dbb3fd6d30b27fc1b292d7cd826ced62
@tjgq
Copy link
Contributor

tjgq commented Feb 9, 2024

FYI - I renamed the target_kind config property to just kind, but otherwise the submitted code matches your PR.

github-merge-queue bot pushed a commit that referenced this pull request Feb 10, 2024
…21276)

Add the target kind (e.g. java_library) to the scrubbing matcher
configuration. This is useful because different kinds may use the same
mnemonic, and specifying an explicit set of labels is labor-intensive
and error-prone.

Closes #21151.

Commit
4bcf855

PiperOrigin-RevId: 605624773
Change-Id: Ib5748ca2dbb3fd6d30b27fc1b292d7cd826ced62

Co-authored-by: Artem V. Navrotskiy <[email protected]>
@iancha1992
Copy link
Member

The changes in this PR have been included in Bazel 7.1.0 RC1. Please test out the release candidate and report any issues as soon as possible. If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=last_rc.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-user-response Awaiting a response from the author team-Remote-Exec Issues and PRs for the Execution (Remote) team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants