Skip to content

perf(ci): install a small package delta on the prepared Tier 2 runtime (#1592) - #2085

Merged
zackees merged 2 commits into
masterfrom
infra/1592-prepared-delta
Oct 24, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/1592-prepared-delta

Conversation

@zackees

@zackees zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member

Refs #1592. Part of #2072 / #930.

Why

The prepared Tier 2 runtime (#1717) cut test-job setup to 20-30 s, but it is used only when the artifact's package closure matches its inventory exactly. Since a zlib security update (zlib1g 1ubuntu3.1 -> 1ubuntu3.2, 1 of 224 packages), every Tier 2 test job logs Runtime selection: stock (current package closure differs) and spends 75-80 s installing the whole closure into the stock base (queue run 06:13 UTC, PR run 40073566086).

What

ci-runtime.py now computes the delta between the closure and the prepared inventory (runtime-selection.py: delta()):

  • up to MAX_DELTA = 16 changed or missing packages: load the prepared image, apt-get update, install exactly those name=version records, then verify the whole closure as before (a delta that does not install fails, it does not fall back);
  • more than 16: stock, as before;
  • no delta: unchanged, including the exact producer-inventory check.

The measurement JSON records the delta. Corrupt archives and identity mismatches still fail closed.

Expected

About 75 s -> 30-40 s setup per Tier 2 test job (prepared load plus one small apt transaction), on every runner, until the image is refreshed. To be confirmed from this PR's run (look for Runtime selection: prepared plus zlib1g:amd64=...).

Tests

  • RED 987d814: ci/test_tier2_runtime_delta.py (5 cases) errors: no delta(), no download_prepared, no MAX_DELTA.
  • GREEN: passes; ./lint passes. test_tier2_ci_runtime.py's fallback case now uses a closure over MAX_DELTA (the intended rule change).

#1592)

One zlib update since the image was made sent every test job to the
stock path (75 s of apt). Up to 16 changed packages now install on top
of the prepared image; the whole closure is still verified.
@zackees
zackees force-pushed the infra/1592-prepared-delta branch from f90b1ba to 7492eaa Compare October 24, 2026 07:46
@zackees

zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member Author

PR run 40075452627: all four test jobs logged Runtime selection: prepared plus zlib1g:amd64=1:1.3.dfsg+really1.3.1-1ubuntu3.2; setup 19.4-36.8 s (stock in the same window on #2091: 40.5-69.9 s, earlier 75-79 s). Same test counts (428 suite, 1 serial), all passed.

@zackees
zackees added this pull request to the merge queue Oct 24, 2026
Merged via the queue into master with commit 5a5c4a3 Oct 24, 2026
33 checks passed
@zackees
zackees deleted the infra/1592-prepared-delta branch October 26, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant