Skip to content
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 issues with path mapping in map_each functions #22227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented May 3, 2024

Fixes the following issues with path mapping applied to map_each functions:

  • Action keys could be stale if an action implementation switches from hard-coded artifact strings to Files mapped at execution time. This commit introduces a special PathMapper instance for fingerprinting, see the long comment on PathMappers.FOR_FINGERPRINTING. It includes a number of tests to verify that neither too much nor too little is mapped during action key computation.
  • The Starlark objects representing mapped artifact roots didn't have the correct semantics for equality and ordered comparisons. They are now unequal to unmapped roots.
  • When not using path mapping, the StarlarkSemantics of a thread used to evaluate map_each callbacks is not modified.

These changes require splitting PathMappers out of analysis_cluster and also make StrippingPathMapper a subclass of PathMapper instead of using an anonymous one.

@fmeum fmeum changed the title Fix semantics Fix issues with path mapping in map_each functions May 3, 2024
@fmeum fmeum marked this pull request as ready for review May 3, 2024 12:34
@fmeum fmeum requested review from a team and lberki as code owners May 3, 2024 12:34
@fmeum fmeum requested review from katre and aranguyen and removed request for a team, lberki and katre May 3, 2024 12:34
@github-actions github-actions bot added team-Performance Issues for Performance teams team-Configurability Issues for Configurability team team-Rules-Java Issues for Java rules awaiting-review PR is awaiting review from an assigned reviewer labels May 3, 2024
@fmeum fmeum removed team-Performance Issues for Performance teams team-Rules-Java Issues for Java rules labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review PR is awaiting review from an assigned reviewer team-Configurability Issues for Configurability team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant