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

Support invalidating processes on out-of-band data #16422

Open
benjyw opened this issue Aug 5, 2022 · 0 comments
Open

Support invalidating processes on out-of-band data #16422

benjyw opened this issue Aug 5, 2022 · 0 comments
Assignees

Comments

@benjyw
Copy link
Sponsor Contributor

benjyw commented Aug 5, 2022

Is your feature request related to a problem? Please describe.
Sometimes a process implicitly depends on the outcome of another process, even though it does not consume any of that other process's outputs, and so there is no causal chain that Pants can use to track this dependency.

For an example and context, see #16419: A child docker image build depends on the parent image build completing successfully first, but since the relevant state is held externally by the docker daemon, the child build's Process object does not change when the parent's does. Note that setting PER_SESSION scope is not sufficient here: Pants will speculate the parent and child processes concurrently, and will have no reason to cancel the child process.

Describe the solution you'd like
A field on Process that gets mixed in to the cache key but doesn't affect the Process output. This field could be a tuple of strings or a map of string to string (where the key identifies what the value represents, for ease of debugging). In the example above, this field could list the image ids of the upstream images.

Describe alternatives you've considered
The workaround is to put those strings in a file in the input Digest, or in an env var. But this is hacky.

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

No branches or pull requests

1 participant