Fix install state path resolving symlinks to unwritable system Python#24
Open
kinto0 wants to merge 2 commits into
Open
Fix install state path resolving symlinks to unwritable system Python#24kinto0 wants to merge 2 commits into
kinto0 wants to merge 2 commits into
Conversation
_install_state_path() called Path.resolve() on the suite venv's python
executable, which follows symlinks to the base interpreter. On systems
where the base interpreter lives in a read-only location (e.g. a system
Python framework at /usr/local/fbcode/), this causes a PermissionError
when writing the per-suite install state file.
Drop .resolve() so the state file is written relative to the venv path,
which is always writable.
Test plan:
Before: bench-servers crashes immediately with PermissionError:
[Errno 1] Operation not permitted:
'/usr/local/fbcode/platform010/Python3.12.framework/...
/.python-lsp-compare-install.json'
After: bench-servers completes successfully across all 4 servers.
Pyrefly: 1 failed point (tsp_core/generic specialization —
pre-existing config bug, not caused by this change).
43 unit tests pass.
This was referenced Apr 22, 2026
rchiodo
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_install_state_path()calledPath.resolve()on the suite venv's python executable, which follows symlinks to the base interpreter/usr/local/fbcode/), this causes aPermissionErrorwhen writing the per-suite install state file.resolve()so the state file is written relative to the venv path, which is always writableTest plan
bench-serverscrashes immediately withPermissionError: [Errno 1] Operation not permitted: '/usr/local/fbcode/platform010/Python3.12.framework/.../.python-lsp-compare-install.json'bench-serverscompletes successfully across all 4 servers. Pyrefly: 1 failed point (tsp_core/generic specialization — pre-existing config bug, not caused by this change). 43 unit tests pass.