[v3-3-test] Speed up constraints-version-check by resolving the baseline once (#70559) - #70596
Merged
Conversation
…ine once (#70559) The Deps matrix in finalize-tests is a serial tail on every canary run: it starts only after the rest of the run has finished and then adds another 40-70 minutes to the wall clock. Roughly half of that time was spent recomputing an answer the command already had. Explaining why a package cannot be upgraded needs two resolutions: the unpinned workspace, and the workspace with the package pinned to its latest version. Only the second depends on the package. The first is the same for every package in a run, because each explanation restores pyproject.toml and uv.lock before the next one starts and the remaining inputs are fixed for the whole command. It was nevertheless re-run for each outdated package, so a scheduled run doing 63 explanations paid for 126 full `uv sync --refresh` invocations where 64 would have done. Resolving the baseline once also removes a latent source of non-determinism: every baseline sync passed --refresh, so an index change part-way through a run could leave two packages compared against different baselines. (cherry picked from commit 4b84899) Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
1 task
potiuk
marked this pull request as ready for review
July 28, 2026 16:22
potiuk
requested review from
amoghrajesh,
ashb,
bugraoz93,
choo121600,
ephraimbuddy,
gopidesupavan,
jason810496,
jedcunningham,
jscheffl,
potiuk and
vatsrahul1001
as code owners
July 28, 2026 16:22
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.
The Deps matrix in finalize-tests is a serial tail on every canary run: it
starts only after the rest of the run has finished and then adds another
40-70 minutes to the wall clock. Roughly half of that time was spent
recomputing an answer the command already had.
Explaining why a package cannot be upgraded needs two resolutions: the
unpinned workspace, and the workspace with the package pinned to its
latest version. Only the second depends on the package. The first is the
same for every package in a run, because each explanation restores
pyproject.toml and uv.lock before the next one starts and the remaining
inputs are fixed for the whole command. It was nevertheless re-run for
each outdated package, so a scheduled run doing 63 explanations paid for
126 full
uv sync --refreshinvocations where 64 would have done.Resolving the baseline once also removes a latent source of
non-determinism: every baseline sync passed --refresh, so an index change
part-way through a run could leave two packages compared against
different baselines.
(cherry picked from commit 4b84899)
Co-authored-by: Jarek Potiuk jarek@potiuk.com