Is there a way to understand why Pants might not b...
# general
s
Is there a way to understand why Pants might not be using a cache on a certain invocation?
f
You can enable debug logging and see what debug logging is dumped for the processes that Pants invokes. Then inspect the attributes of the process invoked to see what might be changing across runs.
The cache key basically consists of a hash of all of the attributes (command line, environment, input files, etc.) for the invoked process. (This comes from the REAPI protocol specification which Pants uses as a model of execution.)
s
Great to know, thanks!
Do you know if there is some API or something to get the cache key? I guess via plugin somehow perhaps? This could come in handy for another thing I'm trying to optimize - I'd love to tag my docker images with
pants-{hash}
or something so CI can pull down previously-built images if they exist