Repository navigation
docs: document virtualenv cache recovery - #11127
Open
nightcityblade wants to merge 2 commits into
Open
nightcityblade wants to merge 2 commits into
nightcityblade wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/faq.md" line_range="196" />
<code_context>
+`pip` in an app-data directory separate from [Poetry's cache]({{< relref "configuration#cache-directory" >}}).
+
+If environment creation fails because this data is corrupt, rerun the command with `-vvv` and find `app_data_dir` in
+the `virtualenv` output. After making sure that no Poetry or `virtualenv` processes are using the directory, delete it.
+`virtualenv` recreates the directory the next time Poetry creates an environment.
+
</code_context>
<issue_to_address>
**Concurrent deletion damages app-data**
When another Poetry or `virtualenv` process starts after the active-process check but before deletion finishes, `EnvManager.build_venv` and `virtualenv` read or write files while the directory is being removed, so environment creation fails or leaves app-data incomplete.
Ensure no Poetry or `virtualenv` process can use the directory from the start of deletion until it finishes.
Also at `docs/faq.md:195`.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: docs/faq.md:196
4 of 5 tasks
This branch has not been deployed
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.
Pull Request Check List
Resolves: #9644
Summary
virtualenvkeeps a separate app-data cache.Validation
pre-commit run --files docs/configuration.md docs/faq.md.venv/bin/python bin/website build --local /tmp/poetry-9644-nightcityblade-2(run frompython-poetry/website)