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

PoC for metadata-based invalidation #20914

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tdyas
Copy link
Contributor

@tdyas tdyas commented May 13, 2024

This PR is a proof of concept for invalidating adhoc_tool and shell_command targets based on the metadata (and not just the content) of the files in the repository.

The PR adds:

  • A new intrinsic (and rule graph support) for getting "full" metadata of a filesystem entry.
  • Use of that support for adhoc_tool and shell_command target types via a new invalidation_globs field.

Naming and API design subject to change.

@tdyas
Copy link
Contributor Author

tdyas commented Jun 1, 2024

@stuhood: I rebased this PR on top of main with your change to intrinsics to make them (appear as?) functions. I'm getting rule graph errors now: https://github.com/pantsbuild/pants/actions/runs/9332193530/job/25687760655?pr=20914#step:9:344

What do I need to do to properly add an intrinsic post the intrinsics as functions change?

EDITED: Solved it. The issue was getting the return type on the intinsic's type stubs wrong.

@tdyas
Copy link
Contributor Author

tdyas commented Jun 4, 2024

The intrinsic has been reworked and split out to #20996. This PR remains a proof of concept so I can still explore the best DX for metadata-based invalidation.

@huonw
Copy link
Contributor

huonw commented Jun 5, 2024

We've just branched for 2.22, so merging this pull request now will come out in 2.23, please move the release notes updates to docs/notes/2.23.x.md, if appropriate. Thank you!

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

Successfully merging this pull request may close these issues.

None yet

2 participants