Repository navigation
🐛 fix(seed): contain reseeding and launcher paths - #3699
Merged
gaborbernat merged 7 commits intoNov 20, 2026
Merged
Conversation
gaborbernat
force-pushed
the
fix/3627-seed-metadata-special-files
branch
from
November 20, 2026 15:09
0e572d2 to
6bff961
Compare
Wait for running seed workers before cleanup and report failures to the caller. Validate metadata as it is read, keep cleanup within the environment, and update launchers using their selected wheel records.
The Windows path mock changed the shared POSIX parser at import time, so later tests treated backslashes as separators. Restore the parser after each mocked test. Wait for the seed worker to start before injecting interrupts so the test checks active-work cleanup. Restore explicit Final types required by the updated lint gate.
gaborbernat
force-pushed
the
fix/3627-seed-metadata-special-files
branch
from
November 20, 2026 15:41
2b4fd7d to
f5d6dbd
Compare
Python 3.9's Path subclass requires an explicit flavour attribute. Keep it on the mock while restoring the shared parser after each test.
gaborbernat
marked this pull request as ready for review
November 20, 2026 18:16
gaborbernat
marked this pull request as draft
November 20, 2026 20:26
Let the CLI stop even when a worker is blocked in an image build. A normal exit would join the worker again during executor and interpreter shutdown. Python callers keep waiting for active workers before temporary cache cleanup. Make cancellation retryable when an interrupt lands before a queued worker signals completion. Refs pypa#3627
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.
Reseeding could block on package metadata, delete files outside the environment or overwrite unrelated launchers. The app-data seeder now checks cleanup targets against the environment and waits for active installs after the first Ctrl+C. The pip seeder updates launchers listed by the selected wheels. Previous cleanup, previous install scheduling.
Reseeding and cleanup
The app-data seeder reads
RECORDandtop_level.txtfrom regular files. It checks each listed path against the environment before lookup, then verifies the resolved deletion target. On Windows it removes a junction itself and processes directories carrying cloud placeholder tags as ordinary directories. The app-data seeder builds images concurrently and installs them one at a time. A separate process can still change the destination between the check and deletion. Metadata cleanup, install scheduling.Ctrl+C cancels queued work, so the environment may be missing seed packages. The seeder waits for active workers before removing temporary app-data. A second Ctrl+C exits the CLI immediately, even if a worker is stuck, and can leave a staging directory or temporary app-data behind. Rerun creation to rebuild the staged image and finish installing packages.
virtualenv.cli_runwaits for active workers before returning control to Python callers. Interrupt handling.Generated launchers
Both seeders use the interpreter's filesystem path bytes when encoding the path as UTF-8 would produce different bytes under a legacy POSIX locale. Paths containing shell quoting syntax get a shell wrapper. The pip seeder matches the complete generated header before rewriting a selected wheel's launcher. These changes apply during seeding. Launcher generation, wheel launcher selection.
Fixes #3624. Fixes #3625. Fixes #3627. Fixes #3632. Fixes #3636.
Draft advisories: ANT-2026-0QH3KBIN, ANT-2026-2DOJ5V6M, ANT-2026-3YPDYV5C. Reported by oss-scanner: ANT-2026-02O7K288, ANT-2026-0QH3KBIN, ANT-2026-2DOJ5V6M, ANT-2026-3YPDYV5C, ANT-2026-5PAH96SM, ANT-2026-7ZNZMO8Q, ANT-2026-GY26H3A6, ANT-2026-NU6BEMWZ.