Skip to content

Reuse managed Python fixtures for discovery tests - #21716

Closed
charliermarsh wants to merge 3 commits into
mainfrom
charlie/ci-python-discovery-fixtures
Closed

charliermarsh wants to merge 3 commits into
mainfrom
charlie/ci-python-discovery-fixtures

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

We currently extract Python distributions repeatedly while testing free-threaded discovery, version-range ordering, and prerelease selection. On macOS, reuse the three versions requested by multiple discovery tests: the first caller installs normally and publishes an independent APFS clone; subsequent callers clone into their private managed directories and use the normal command to create local aliases and executable entries. When cloning is unavailable, we use the normal installation. The ordering test also installs Python 3.15 and 3.15t together so we can extract them concurrently.

Across four recent main CI runs (1, 2, 3, 4), the three slowest affected macOS tests had median durations of 28.8s, 22.6s, and 17.9s under concurrent CI load. All five focused macOS integration tests pass, including a check that the ordering test's canonical alias and executable remain private.

Locally on macOS/APFS with warmed compressed downloads, the five serial tests had median times of 19.0s on main (18.3–19.7s) and 18.1s on this branch (17.0–19.3s) with empty prepared-fixture roots. With populated fixtures, the medians were 20.8s (18.4–23.1s) and 15.4s (15.3–15.6s); the ordering test alone went from 5.9s to 5.1s. There were two alternating samples per revision, and the cold ranges overlap.

In the first candidate macOS CI run and the repeat, the five focused tests summed to 62.0s and 63.1s, versus 67.5s at the exact main base and a 78.1s median across the four main runs above. The ordering test took 23.0s on the exact base and 17.7s and 17.0s on this branch. The complete nextest run took 228.1s and 218.0s on this branch, versus 199.6s at the exact base and a 202.6s median across the four main runs. The exact base and both candidate runs contained the same 4,166 tests. Individual test durations are summed under concurrent CI load; these runs do not show an improvement in the complete suite.

@charliermarsh charliermarsh added the test:macos Enable macOS tests for a pull request label Sep 15, 2026

This branch was previously deployed

1 inactive deployment
automations — 47d9b98f Deployed Sep 15, 2026 by charliermarsh via review / security review #46769
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing test:macos Enable macOS tests for a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant