Skip to content

ci: Tier 2 Linux runtime installs apt packages on every hosted run; refresh the prepared runtime and retry the delta install #5237

Open

Description

@zackees

Refs #5224, Refs #5199

Evidence (merge_group, 2026-11-19):

  • Hosted "Rust Tier 2 Linux (tests ON/OFF)" jobs run rust/tools/linux-validate/ci-runtime.py. The prepared runtime asset (prepared-runtime.json, revision ee14833, built 2026-10-22) is a month behind Ubuntu -updates/-security. Every run selects "prepared plus <11 packages>" and does apt-get update + apt-get install of them inside the container (ci-runtime.py:187-194). Job 135534354049: setup_seconds 67.2 (hosted) against 31.2 on the Dell (job 135541883266).
  • That install has no retry and no timeout. During the Ubuntu archive outage, jobs 135543622650 (run 44517008817) and 135548881324/135548881279 (run 44517003349) failed: connect errors held 13 min (12:00-12:13Z), and the next job failed with "Version '2.43-2ubuntu2.7' for 'libc6' was not found" (pinned versions superseded). Both runs failed the gate.
  • The delta limit is MAX_DELTA = 16 (ci-runtime.py:30). The delta is already 11, so another few -updates make the job fall back to a stock install of the whole closure (about 75 s, see perf(ci): validate prepared Tier 2 image transfer before rollout #1592).
  • Hosted Tier 2 Linux build also runs "Install Git" (36 s median) and "Install Tier 2 Packages" (34 s median) because ci/tier2_image.py:82-84 returns the stock image when MQ_RUNNER_LABELS is empty; only Dell-labelled runs use ghcr.io/obs-rust/tier2-linux.

Proposal:

  1. Rebuild and publish the prepared runtime asset from current -updates, and have the producer rerun automatically when the delta exceeds a small threshold (for example 4 packages), so the delta stays near zero.
  2. Wrap the delta apt-get update/install in ci-runtime.py with timeout and 3 retries, as .github/scripts/retry does for the build job, and fail with the package list rather than after 13 min.
  3. Let select_image return the ghcr prebaked image on hosted runners too (keep the stock fallback on any registry error), so the hosted build job skips both apt steps.

Acceptance: a hosted merge_group run shows no apt network traffic in the Tier 2 Linux jobs, with the same tests run. Estimated saving on the hosted Linux chain (build then tests): about 70 s from step 3 plus about 45 s from steps 1-2; step 2 removes the 13 min hang on archive outages.

Activity

  1. added
    ready
    ci
    on Nov 19, 2026
  2. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Claiming: bounded Tier 2 Linux runtime apt recovery.

    1. Add RED Python self-tests for timeout, bounded retry/backoff, stale package-version recovery, and package diagnostics, then implement GREEN.
    2. Trace the prepared-runtime producer and document the exact maintainer refresh action; assess hosted GHCR fallback without publishing assets or changing variables.
    3. Run the touched CI self-tests and ./lint, then publish according to backpressure. First PR expected this session.
  3. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Releasing #5237 — the local command guard rejected the required retry-test patch, misclassifying mocked Python sleep calls as a shell wait. No implementation or PR was published. Investigation confirmed the existing producer is ci.yml tier2-setup-producer (manual tier2-setup-probe=true on master), running ci/tier2_setup_probe.py produce; its tier2-setup-image and tier2-setup-metadata artifacts expire after one day. Refresh requires a new immutable obs-studio-libs prerelease and a descriptor-update PR, followed by complete OFF/ON qualification. Hosted GHCR selection remains unchanged.

  4. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    Claiming: bounded Tier 2 runtime apt recovery, continuing in pool slot obs-studio2 (third attempt).

    1. Add and commit RED self-tests for apt-native retries/timeouts, coreutils timeout, and one index refresh after an unavailable pinned version.
    2. Implement GREEN without hand-written waiting, retain exact package pins, and document the prepared-runtime maintainer refresh procedure. Hosted GHCR stays unchanged.
    3. Run touched Python self-tests and ./lint once; publish per backpressure and hand off with auto-merge pinned to the verified head. First PR expected this session.
  5. zackees commented on Nov 19, 2026

    @zackees
    MemberAuthor

    #5249 merged (e17df59). The delta apt-get update/install in ci-runtime.py now uses apt's own retries and timeouts inside a coreutils timeout wrapper, and refreshes the index once on a superseded pin. An archive outage now fails fast instead of hanging 13 min. Two parts remain, both needing the maintainer: (1) refreshing the prepared-runtime asset (dispatch ci.yml with tier2-setup-probe=true on master, then publish; the exact steps are in #5249's body), so the delta drops from 11 packages to zero; (2) hosted use of ghcr.io/obs-rust/tier2-linux, which needs the package made public first. Leaving this open for those.

  6. moved this from In progress to Ready in obs-rust Multiviewon Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciready

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions