Skip to content

ci: Cut per-run setup from the Rust Tier 2 jobs - #438

Closed
rdoupe wants to merge 2 commits into
obs-rust:masterfrom
rdoupe:infra/ci-tier2-setup
Closed

rdoupe wants to merge 2 commits into
obs-rust:masterfrom
rdoupe:infra/ci-tier2-setup

Conversation

@rdoupe

@rdoupe rdoupe commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Part of #427. Removes per-run setup from the Rust Tier 2 jobs. Each commit is measured on this PR's own runs; the description is updated as the commits land.

1. Cache the Linux Tier 2 Docker image

The Tier 2 Linux job rebuilt its ubuntu:26.04 image (about 80 apt packages plus the pinned Rust toolchain) on every run. That was 137 s of a 4 min job, against 22 s and 26 s for the two ccache-backed builds. The workflow now builds the image with Buildx and the GitHub Actions cache, then tells run.sh not to rebuild it (OBS_TIER2_IMAGE_PREBUILT). Only master pushes write the layer cache, matching the compiler-cache policy. Local runs of run.sh are unchanged.

A temporary DO NOT MERGE commit lets this PR write the cache once, so a rerun can measure a warm build. It is dropped before review.

Refs #427

🤖 Generated with Claude Code

The Tier 2 Linux job rebuilt its ubuntu:26.04 image (about 80 apt
packages plus the pinned Rust toolchain) on every run: 137 s of a 4 min
job, against 22 s and 26 s for the two ccache-backed builds.

Build the image in the workflow with Buildx and the GitHub Actions
cache, then tell run.sh not to rebuild it (OBS_TIER2_IMAGE_PREBUILT).
Only runs on master write the layer cache, matching the compiler cache
policy (including the release gate's runs, obs-rust#436). Local runs of run.sh
are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Temporary, so a rerun of this PR measures a warm image build. Dropped
before review.
@rdoupe
rdoupe force-pushed the infra/ci-tier2-setup branch from 3811f02 to 7a8b477 Compare October 13, 2026 04:39
@rdoupe

rdoupe commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Closing. Measured, it doesn't pay off.

  • Cold run: the image build took 204 s, uploading about 700 MB of layers to the Actions cache. Today's uncached build takes 137 s.
  • Warm run (~45 min later): the cache index was still there, but the layers had already been evicted, so the image was rebuilt from scratch (200 s, 0 cached layers).
  • Why: the repo's Actions cache is at 10.68 GiB against GitHub's 10 GiB limit, so least-recently-used entries are evicted continuously. A 700 MB layer cache wouldn't survive between PRs, and it would push out the ccache and Rust caches other jobs depend on.

FYI only: an image pushed to GHCR from master and pulled by PRs would avoid the Actions cache entirely. The eviction pressure probably costs cache hits in other jobs too.

@rdoupe rdoupe closed this Oct 13, 2026
@rdoupe
rdoupe deleted the infra/ci-tier2-setup branch October 13, 2026 04:49
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