-
-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix secondary ownership warning semantics #19191
Conversation
...I never was particularly great at algorithms. |
Thanks for working on this. I tried it on the reproducer from #19174, by:
I still got the warning, unfortunately. |
I haven't understood the code deeply yet, but this code seems like it's trying to reverse engineer a decision by some lower layer (maybe something about
|
The idea was to be surgical since it'll be removed shortly, so muddying the happy path code temporarily seemed annoying. |
Yeah looks like a very obvious bug in the code 🤦 |
Ah yeah, OK this seems to be the only way to really get this right. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -986,16 +996,17 @@ def create_live_and_deleted_gets( | |||
) | |||
for secondary_owner_field in secondary_owner_fields: | |||
matching_files.update( | |||
*secondary_owner_field.filespec_matcher.matches(list(sources_set)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a bugfix. See https://pantsbuild.slack.com/archives/C0D7TNJHL/p1685550973185069
Fixes #19174 by boiling the criteria to warn down to: 1. The Address/Target/FieldSet is matched due __only__ to `SecondaryOwnerMixin` 2. It was matched due to a file spec (literal or glob) 3. It wasn't matched due ton address spec - This is just to handle the corner case where it was matched due to file and address In order to facilitate 1., `Owner` and `find_owner` have been (temporarily) modified. Additionally, the rule that goes from `RawSpecsWithOnlyFileOwners` -> `Addresses` has been split to return `Owners`, with an additional rule added to complete the graph (`Owners` -> `Addresses`). Then 2 and 3 are facilitated by just requesting the addresses based on the include specs.
…9224) Fixes #19174 by boiling the criteria to warn down to: 1. The Address/Target/FieldSet is matched due __only__ to `SecondaryOwnerMixin` 2. It was matched due to a file spec (literal or glob) 3. It wasn't matched due ton address spec - This is just to handle the corner case where it was matched due to file and address In order to facilitate 1., `Owner` and `find_owner` have been (temporarily) modified. Additionally, the rule that goes from `RawSpecsWithOnlyFileOwners` -> `Addresses` has been split to return `Owners`, with an additional rule added to complete the graph (`Owners` -> `Addresses`). Then 2 and 3 are facilitated by just requesting the addresses based on the include specs.
### Internal * upgrade to Rust v1.70.0 ([#19228](#19228)) * Remove the last mentions of NO_TOOL_LOCKFILE. ([#19229](#19229)) * Upgrade Helm unittest ([#19220](#19220)) * Prepare `2.17.0rc0`. ([#19226](#19226)) * Use a trait for remote action result caching ([#19097](#19097)) * Port `Field` to Rust ([#19143](#19143)) * Upgrade `pyo3` to `0.19`. ([#19223](#19223)) * Prepare `2.16.0rc5`. ([#19221](#19221)) * internal: Create dep inference request type ([#19001](#19001)) * Avoid requiring Python when trying to install Python (using Pyenv) ([#19208](#19208)) * Fix secondary ownership warning semantics ([#19191](#19191)) * Bump os_pipe from 1.1.3 to 1.1.4 in /src/rust/engine ([#19202](#19202)) * Include committer date in local version identifier of unstable builds ([#19179](#19179)) * Ensure we set the AWS region. ([#19178](#19178))
Fixes #19174 by boiling the criteria to warn down to:
SecondaryOwnerMixin
In order to facilitate 1.,
Owner
andfind_owner
have been (temporarily) modified. Additionally, the rule that goes fromRawSpecsWithOnlyFileOwners
->Addresses
has been split to returnOwners
, with an additional rule added to complete the graph (Owners
->Addresses
).Then 2 and 3 are facilitated by just requesting the addresses based on the include specs.