I think the current implamentation of `{pants.hash...
# general
s
I think the current implamentation of
{pants.hash}
is too brittle and makes using that hash ineffective
Copy code
# Data from Pants.
        interpolation_context["pants"] = {
            # Present hash for all inputs that can be used for image tagging.
            "hash": stable_hash((build_args, build_env, snapshot.digest)),
        }
the problem is that the hash breaks even for things that should not affect it, for example: • image tags (build should be inaffected) • envs that are meant to change (i.e. access tokens)
for instance, if across 2 branches, for the same "content" your attempt to add an image_tag based on branch name or commit it, this will produce 2 different pants.hashes, even if we are building exactly the same thing
would you have any concern in have. more granular filter and create a list of "configurable" inputs that could be ignored?
this is due to this btw: https://github.com/pantsbuild/pants/issues/22575. I will submit a PR soon