Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Validate and maybe prune interpreter cache run over run #7225
Fix needed for #3416
Add validation logic to interpreter selection that verifies the executable of cached interpreters in two places: 1) by validating the exe marked in the interpreteter.info manifest during select_interpreter.py task and 2) by ensuring that the exe exists when we load an interpreter from a path in the
Users will not experience stale cache problems as outlined in #3416
I cancelled the CI run and am going to rekick after I can validate this is not destructive to the environment run over run. Also - testing this has proven to be a challenge and it will likely require a slow, heavy-handed int test. I want to get feedback on the approach and hear opinions about testing and whether we should incur that cost before I invest more time. Alternatives are lots of mocking in a unit test file for interpreter selection, which might not fully exercise the changed code.
@CMLivingston re testing. Can't you just create a unit test for each of these that uses the trick of:
I find this yields a python executable that works just fine:
This would allow you to setup an isolated PATH to grab interpreters from for the unit tests that you could nuke without fear to simulate interpreters being uninstalled.