Skip to content

perf(ci): validate prepared Tier 2 image transfer before rollout #1592

Closed

Description

@zackees

Context

Follow-up to #1581's prepared-environment experiment. Keep the current stock Tier 2 image and apt download cache until fresh GitHub-runner measurements demonstrate a net benefit from an immutable prepared environment.

Observed CI package installation remains 30–52 s per Tier 2 job despite apt archive hits. A local bosn experiment built the same package set on the workflow's pinned Ubuntu base:

  • Base: ubuntu:26.04@sha256:f144425ff09be612d6d9ad965196e9cdc23dae1f42110a8a11a3e9a8198759f7.
  • Package inputs: rust/tools/linux-validate/apt-packages.txt, plus CI bootstrap git/ca-certificates/curl/sudo/zstd.
  • Quiet fresh stock container with restored apt archives: 150.634 s CLI wall; bootstrap 21 s and package installation 124 s.
  • Fresh container using the locally resident prepared image: 4.343 s CLI wall including ensure/cache lookup and package inventory verification.
  • Both produced package/version inventory SHA-256 1a2ca4ddedf6440839498f05a3d569854d1e7860c4ff48d4cb7e38fa81af6040.
  • Prepared OCI manifest: sha256:8bfa4af79039916a758817b4ca9f111e73c5adfa375e4bc0cb6173986359b41d; Docker-reported Size 541,093,691 bytes (containerd snapshotter; not a verified uncompressed rootfs or wire-byte count). This image exists locally, not in a verified public registry.

These are local observations, not a CI speedup: local package installation was much slower than GitHub's; the prepared result excludes cold registry download, publication and layer-unpack costs. Additional runs overlapped package/image work and are excluded from the quiet comparison. One supposed warm repetition had its own bosn volume and was also excluded; the quiet repetition used archives copied from the seed and an explicit shared bind.

Current registry inventory attempt (gh api 'orgs/obs-rust/packages?package_type=container') returns HTTP 403: the credential needs read:packages. No compatible existing published image or approved publication path was verified. No producer workflow, registry publication, token change or CI environment rollout was introduced by the experiment.

#525 covers prebuilt dependency assets (its latest maintainer decision uses local bosn producers for manylinux/AppImage); this task is specifically the Ubuntu Tier 2 runtime image and its complete transfer/startup cost. #1055 already landed the apt archive cache.

Proposal

  1. Establish an approved accessible immutable image/publication route, or an existing compatible prepared image. Preserve the current package environment and record resolved package versions/snapshot inputs; a base digest alone does not pin mutable apt repositories.
  2. Using existing workflow infrastructure, measure fresh-runner pull/restore, unpack, container start and inventory verification against the current stock image plus apt archive restore/install. Keep cold and resident-image measurements separate.
  3. Run unchanged OFF/ON suites against the prepared environment, verifying the registry partition, ABI/symbol checks, executed/skipped coverage and timing stability.
  4. Adopt only if total required-gate latency improves with acceptable publication/retention and runner-cost overhead; otherwise record a measured rejection and retain apt caching.

Acceptance criteria

  • Resolve registry access/publication provenance without exposing credentials or silently changing package visibility.
  • Publish reproducible locked package inputs, image digest, compressed transfer bytes, cold/warm setup timings, repetitions and variance on representative GitHub runners.
  • Compare total setup plus testing and required-gate time, including producer/pull/restore/unpack cost; do not substitute local startup for CI evidence.
  • Preserve unchanged C tests/public headers, OFF/ON coverage, RUN_SERIAL isolation, Rust compiler-cache safeguards and master-only cache writers.
  • Any CI/configuration implementation has focused RED → GREEN evidence and passes the normal required gate. No new workflow files without explicit authorization.
  • Record an explicit adopt/reject decision and link the measured results back to perf(ci): shorten serial Tier 2 tests, overlap Qt builds, and reduce setup delays #1581.

Decisions

  • Defer deployment for the current speed batch: local readiness is proven, but net fresh-runner benefit and a usable immutable publication route are unverified.
  • Treat the observed 403 as a registry-inventory limitation, not proof that a future workflow token could never publish.
  • Measure using existing infrastructure; do not create a new producer workflow or repository as part of investigation without the required sign-off.

Related issues

#1581, #525, #1055.

Prepared-runtime rollout — 2026-10-22

#1717 merged normally at 0e42adcfeff236099f7b8f7cecff054c267079ab; queue run39729486071 passed. Approved immutable publication uses the existing obs-rust/obs-studio-libs release-asset route, without registry permissions, visibility changes or additional CI credentials. Catalogue PR obs-rust/obs-studio-libs#7 merged and the release is promoted. Asset493631934bytes, SHA2565e5102bfb16ef6d9bec4d24fbe3ee3bafa7abb5f565ad7c7308320cf4df5a558; full inventory, base/image identity and producer provenance are pinned in rust/tools/linux-validate/prepared-runtime.json.

Fresh experiment39721238636: three hosts per variant, accounted setup median55.604→24.510seconds including transfer/restore, ranges49.997–67.755 vs24.431–42.751. Explicit producer phases91.326seconds, amortized outside the required path. Stock model differs from production bootstrap; teardown grace is excluded. Normal prepared-path PR/queue qualification observed setup19.627–36.068seconds, complete suites with zero failures and the same3Pulse skips; final queue357registered/354executed per mode, timing history restored. Source revisions and registered counts differ across runs.

Decision: adopt the qualified prepared runtime with exact closure matching, stock fallback for changed packages/unavailable assets, and fail-closed integrity checks. Preserve complete OFF/ON suites, unchanged C tests/public headers, deinterlace isolation, eight Rust binaries, disabled unsafe wrapper and master-only remote writers. Focused RED8746a5885→GREENcbcb1f098; local full lint100.3seconds; independent review clean; final PR39728550270 and queue39729486071 green. No new workflow file.

Final available-run comparison is published on master in #1754 and docs/ci-speed-2026-10-22.md. The maintainer explicitly waived the 24-hour wait; the fixed after window is October 22, 05:52:00–07:12:45 UTC. Matched complete-Linux PR median 691→555 seconds (n=5→3), queue 526→560.5 seconds (n=5→2); median runner-minutes fell 6.9%/9.9%. Source/cache/workload differences and small-sample p95 limits remain explicit. This mixed queue result does not prove the stronger net-gate adoption criterion, so this issue stays open for that criterion, rather than waiting on the superseded 24-hour protocol. Runtime deployment, complete coverage qualification and measured setup benefit are complete. Final evidence is linked back to #1581.

Activity

  1. zackees commented on Oct 22, 2026

    @zackees
    MemberAuthor

    Implementing this experiment as part of the active #1694 batch. #1708 passed required PR CI and is in the normal merge queue.

    The chosen route uses short-lived Actions artifacts in the existing Pull workflow, avoiding GHCR inventory/publication credentials and introducing no workflow file, repository, registry visibility change or cache writer. A manual master-only input adds one producer and three fresh consumers per variant. Image metadata and compressed image are separate so stock consumers do not pay prepared-image transfer. Exact archive SHA256, image identity, complete dpkg inventory and resident-image rejection are enforced. Producer cost and Actions upload/download/restore durations remain part of the final accounting.

    The first prepared consumer also runs both unchanged complete OFF/ON suites. Normal full validation remains; the final gate checks the optional experiment when requested. This protocol is not an adoption decision or proof of speedup.

    Dispatch waits until #1707's runtime manifest and #1708 are both merged. Local package-closure validation is already complete, but hosted runtime closure and fresh image-transfer results remain pending. No replacement of fresh measurements with resident-image timing.

  2. zackees commented on Oct 22, 2026

    @zackees
    MemberAuthor

    Final speed-batch report: #1754; measurements and portable evidence. The maintainer explicitly waived the24h wait; the fixed after window is October22,05:52–07:12:45UTC (80m45s),36listed/29terminal/7active-or-queued at capture. This is not a full-day result.

    Prepared runtime is deployed and qualified through #1717 and obs-rust/obs-studio-libs#7. Fresh setup experiment:55.604→24.510s median (3hosts/variant), with transfer, verification and producer-cost limits retained. All10matched after modes used prepared with inventory verified; setup14.78–27.59s; complete suites358–360registered/355–356executed,0failed,3–4disclosed Pulse software-prerequisite skips.

    Net gate evidence is mixed: matched PR691→555s, queue526→560.5s, with median runner-cost reductions6.9%/9.9%. This does not prove the stronger queue/net-gate adoption criterion. Keep this issue open for that criterion; the24h wait is superseded by the maintainer waiver, not a remaining blocker. The unexplained pre-window portal alarm and exact-artifact controls remain in the report. Linked back to #1581.

  3. zackees commented on Oct 22, 2026

    @zackees
    MemberAuthor

    Current residual-bootstrap observation from the existing ordinary master run39858120197 (source233db443aa3f528b30da7fe2dea19fddabf52f6c), while collecting #1801 consumer evidence:

    Linux Tier2 build120105801763 is terminal FAILURE. Install Git ran21:42:23–21:49:40UTC (437s), then exited100. The log records Ubuntu archive/security HTTP:80 connection timeouts and failed package downloads; apt fetched8,519kB in6min3s but could not obtain all git/curl/zstd dependencies. Checkout and every later cache/runtime/build/test step were skipped. This is a pre-checkout bootstrap failure, not a prepared-runtime inventory failure, source compilation failure, cache-restore miss or proof that prepared-runtime adoption regressed.

    The later run-level outcome is still being observed (Fast Gate live). No whole workflow/single-job retry, replacement dispatch or test weakening was used. Existing later master traffic can provide the missing consumer observation without repeating this failure merely for measurement. Relevant to #1592's residual setup/net-gate accounting: retain failed-bootstrap time separately from successful prepared setup measurements. It does not overturn the earlier qualified prepared runtime or establish a global Ubuntu outage.

    Raw completed-job log SHA2564e36513ed59c928a9b9eac74bc7af076c2ced2c4c0a279b2bd4b69f2d6576cf9; exact job metadata and raw log retained under #1801 for the next portable evidence update. No new implementation claim.

  4. added
    P3
    size:M
    on Oct 25, 2026
  5. zackees commented on Oct 25, 2026

    @zackees
    MemberAuthor

    /ready

    Triage: measurement-gated CI work with a clear rule (keep the stock image unless fresh runner measurements show a net gain). Partly delivered: #2085 installs a small package delta onto the prepared image, so one package change no longer falls back to stock, and #2094 skips dpkg fsync. Acceptance: a measured Tier 2 setup-time comparison (prepared plus delta versus stock) over representative runs, and the rollout or rollback decision recorded here. P3, size:M.

  6. added
    ready
    on Oct 25, 2026
  7. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Claiming: batched with #2888 and #2072 into one PR to cut CI runs (maintainer direction: ~3 similar issues per PR). Starts after #2991 merges (same workflow file).

  8. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Measured for the acceptance criterion (in #3012, no code): in the last 60 successful CI runs, all 150 Tier 2 Linux test jobs used prepared (plus the package delta), with setup_seconds 28.6 s median (20.5–59.0). The stock baseline was 55.6 s in the fresh experiment and 75–79 s before #2085. Decision: keep prepared plus delta, no rollback. This can close once #3012 lands.

  9. moved this from Ready to In progress in obs-rust Multiviewon Oct 30, 2026
  10. zackees commented on Oct 30, 2026

    @zackees
    MemberAuthor

    Acceptance met: the measured comparison and the keep-prepared decision are recorded above. #3012 has merged.

  11. moved this from In progress to Done in obs-rust Multiviewon Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3readysize:M

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions