Where do we compute the fingerprint of a dataclass...
# development
Where do we compute the fingerprint of a dataclass (e.g., a Process)?
I believe the hash function, which is auto-done by dataclass. For some intrinsics, we now define them in Rust and manually implement hash. See fs.rs
It's only guaranteed to return the same result for the same input within a single process
I hope not, because Python hash() isn't consistent across processes
But I doubt that's what we're using since we'd get no cache hits across a pantsd restart, and presumably wed have noticed
for CAS purposes, the cache key is the sha-256 hash of the encoded REAPI protobuf
👍 1
at least for remote execution
Where in the code is this computed?
I'm trying to debug a cache miss that shouldn't be
the action digest is being used as the cache key
(the REAPI action includes the command digest and input root digest)
do you have debug logs of the command/action protos? if not, maybe add a debug log of the action and command protos in the `digest` function and see exactly what is being computed
`-ldebug`does print the protos out so would be helpful to see logs from both runs
Cool, that is very helpful