-
-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
system_binary "test binary" caches failures across pantsd invocations (and doesn't work with shim
scripts)
#21744
Comments
shim
scripts)
Sorry for the trouble. Thanks for tracking down that code. There's a bit more context/info in the called function's docstring: pants/src/python/pants/core/util_rules/environments.py Lines 540 to 573 in 9036f8c
In particular, when running locally, this is only cached "per restart", i.e. for a pantsd session. Thus, getting Pantsd to restart ( This ends up being a performance/"correctness" trade-off: no caching makes for a slower experience. Does the pantsd tip help? Maybe we could even improve the error message to tell people about this, since it's easy to trip over: pants/src/python/pants/backend/adhoc/run_system_binary.py Lines 63 to 155 in e82a4ff
|
It seemed to be "sticky" for me (aka persisted after restarting pantsd).. Let me double check that though, I may be misspeaking. Yeah, I'm not sure what the answer is here. For this specific case, there's a config file that controls the "live binary".. It'd be nice if we could add that config file (in |
An alternative solution would be to add an attribute to the We already have a similar idea for |
This is feasible to implement in local execution on Pants v2.23.x+ because the rules engine now has the ability to retrieve metadata of system paths outside of the repository (via the |
Describe the bug
We use julia via juliaup (similar to pyenv, but for Julia). We have the following
system_binary
declaration:Caching this makes sense for "static" binaries. However,
juliaup
installs a shimjulia
script which uses thedefault
juliaup julia version. Thus, thetest 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
andjuliaup default 1.9
to see the failure modes.The text was updated successfully, but these errors were encountered: