diff --git a/src/python/pants/engine/process.py b/src/python/pants/engine/process.py index 594a18980fe..cdea5e870e9 100644 --- a/src/python/pants/engine/process.py +++ b/src/python/pants/engine/process.py @@ -354,13 +354,12 @@ class UncacheableProcess: @rule -async def make_process_volatile(uncacheable_process: UncacheableProcess) -> Process: +async def make_process_uncacheable(uncacheable_process: UncacheableProcess) -> Process: uuid = await Get(UUID, UUIDRequest()) process = uncacheable_process.process env = dict(process.env) - env["__PANTS_FORCE_PROCESS_RUN__"] = str(uuid) # This is a slightly hacky way to force the process to run: since the env var # value is unique, this input combination will never have been seen before, # and therefore never cached. The two downsides are: @@ -368,6 +367,7 @@ async def make_process_volatile(uncacheable_process: UncacheableProcess) -> Proc # unlikely to cause problems in practice. # 2. This run will be cached even though it can never be re-used. # TODO: A more principled way of forcing rules to run? + env["__PANTS_FORCE_PROCESS_RUN__"] = str(uuid) return dataclasses.replace(process, env=FrozenDict(env))