Skip to content

Commit

Permalink
More renaming.
Browse files Browse the repository at this point in the history
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
  • Loading branch information
jsirois committed Sep 13, 2020
1 parent 5411239 commit 15c306c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python/pants/engine/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,20 +354,20 @@ 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:
# 1. This leaks into the process' environment, albeit with a funky var name that is
# 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))

Expand Down

0 comments on commit 15c306c

Please sign in to comment.