Skip to content

Ensure that a symlinked exported venv exists and is valid.#18575

Merged
benjyw merged 2 commits intopantsbuild:mainfrom
benjyw:ensure_cache_symlink
Mar 24, 2023
Merged

Ensure that a symlinked exported venv exists and is valid.#18575
benjyw merged 2 commits intopantsbuild:mainfrom
benjyw:ensure_cache_symlink

Conversation

@benjyw
Copy link
Contributor

@benjyw benjyw commented Mar 24, 2023

Now, if users delete or corrupt the pex_root named cache, rerunning the export
command will fix things.

Also updates the IT to use the non-deprecated pants cli invocation for export,
i.e., enumerating the resolves you want with --resolve= rather than passing specs.

This test was slow, so I also removed some redundancy - we didn't need to laboriously
test that many tools can export. A sampling was enough. Now even with the added test
the test file as a whole runs in about the same time as previously (~100 seconds).
This will be sped up further once we remove the old-style, deprecated tool lockfiles.

@benjyw benjyw added the category:bugfix Bug fixes for released features label Mar 24, 2023
@benjyw benjyw requested review from jsirois and stuhood March 24, 2023 02:15
@benjyw
Copy link
Contributor Author

benjyw commented Mar 24, 2023

Fixes #18508

Now, if users delete or corrupt the pex_root named cache, rerunning
the export command will fix things.
@benjyw benjyw force-pushed the ensure_cache_symlink branch from 9a77608 to 8085212 Compare March 24, 2023 02:17
Copy link
Contributor

@jsirois jsirois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An IT would be good with a custom named_cache dir rigged for blow away between runs but this does LGTM.

@benjyw
Copy link
Contributor Author

benjyw commented Mar 24, 2023

An IT would be good with a custom named_cache dir rigged for blow away between runs but this does LGTM.

Good idea, added a test. And also improved the existing test.

@benjyw
Copy link
Contributor Author

benjyw commented Mar 24, 2023

PS I verified that the test fails on main and passes with this PR's original change.

@benjyw benjyw merged commit 8fef19f into pantsbuild:main Mar 24, 2023
@benjyw benjyw deleted the ensure_cache_symlink branch March 24, 2023 16:47
@benjyw benjyw added this to the 2.16.x milestone Mar 24, 2023
benjyw added a commit to benjyw/pants that referenced this pull request Mar 24, 2023
…d#18575)

Now, if users delete or corrupt the pex_root named cache, rerunning the
export command will fix things.

Also updates the IT to use the non-deprecated pants cli invocation for
export, i.e., enumerating the resolves you want with `--resolve=` rather
than passing specs.

This test was slow, so I also removed some redundancy - we didn't need
to laboriously test that many tools can export. A sampling was enough. 
Now, with the added test, the test file as a whole runs in about the
same time as previously (~100 seconds).

This will be sped up further once we remove the old-style, deprecated
tool lockfiles.
stuhood pushed a commit that referenced this pull request Mar 24, 2023
…ck of #18575) (#18585)

Now, if users delete or corrupt the pex_root named cache, rerunning the
export
command will fix things.

Also updates the IT to use the non-deprecated pants cli invocation for
export,
i.e., enumerating the resolves you want with `--resolve=` rather than
passing specs.

This test was slow, so I also removed some redundancy - we didn't need
to laboriously
test that many tools can export. A sampling was enough. Now even with
the added test
the test file as a whole runs in about the same time as previously (~100
seconds).
This will be sped up further once we remove the old-style, deprecated
tool lockfiles.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:bugfix Bug fixes for released features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants