Skip to content

system_binary "test binary" caches failures across pantsd invocations (and doesn't work with shim scripts) #21744

Open
@trhodeos

Description

@trhodeos

Describe the bug
We use julia via juliaup (similar to pyenv, but for Julia). We have the following system_binary declaration:

system_binary(
    name="julia",
    binary_name="julia",
    fingerprint=r".*1.10.*",
    fingerprint_args=["-v"],
)

Caching this makes sense for "static" binaries. However, juliaup installs a shim julia script which uses the default juliaup julia version. Thus, the test binary step gets cached since the "inputs" (aka the shim script) havent changed.

This means that if the Test Binary rule breaks (or passes) once, it'll always be that value until the cache is deleted.

Pants version
2.23.0

OS
MacOS (but most likely happens on both)

Additional info
Here's a repro case. Note that you need juliaup installed. You should toggle between juliaup default 1.10 and juliaup default 1.9 to see the failure modes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions