Skip to content

[v3-3-test] Speed up constraints-version-check by resolving the baseline once (#70559) - #70596

Merged
potiuk merged 1 commit into
v3-3-testfrom
backport-4b84899-v3-3-test
Jul 28, 2026
Merged

[v3-3-test] Speed up constraints-version-check by resolving the baseline once (#70559)#70596
potiuk merged 1 commit into
v3-3-testfrom
backport-4b84899-v3-3-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

…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>
@potiuk
potiuk marked this pull request as ready for review July 28, 2026 16:22
@potiuk
potiuk merged commit bacf9cf into v3-3-test Jul 28, 2026
3 checks passed
@potiuk
potiuk deleted the backport-4b84899-v3-3-test branch July 28, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant