Skip to content

Mirror: linux/amd64 copies only (12.3 GB → 1.3 GB), at the per-repo path; prune unlisted copies - #222

Open
ndbroadbent wants to merge 2 commits into
mainfrom
ci/mirror-amd64-repo-path
Open

ndbroadbent wants to merge 2 commits into
mainfrom
ci/mirror-amd64-repo-path

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Cuts the base-image mirror's private package storage (billed per GB-month beyond the org's included Packages storage) from about 12.3 GB to 1.3 GB. It also moves the mirror to the per-repo path that every DocSpring repo will use.

Why: crane copy of a multi-arch index copies every platform. CI's runners only ever pull linux/amd64. Sizes per image, measured from Docker Hub's manifests:

image all platforms linux/amd64
caddy:2.11.9 4860 MB (mostly Windows images) 24 MB
rust:1.99.1-trixie 4574 MB 602 MB
postgres:17 1133 MB 167 MB
buildkit:buildx-stable-1 653 MB 113 MB
node:24-trixie-slim 346 MB 82 MB
rustfs:1.0.6 266 MB 135 MB
debian:trixie-slim 253 MB 29 MB
aws-cli:2.17.0 251 MB 125 MB
total 12336 MB 1277 MB

Changes:

  • .github/mirror.txt: each digest is now the source's linux/amd64 image manifest, so crane copies only that. It's still a content pin to the same bytes Docker Hub serves. The format is unchanged.
  • Path: copies go to ghcr.io/docspring/visualci/mirror/<name> (<org>/<repo>/mirror/<name>). Each repo's own workflow creates, and so owns, its packages, which gives it read access with no manual grants. The cigen coordinator asked for the same format, path and step names in every repo, so a later cigen module can generate them.
  • mirror.yml: a new step, "Remove copies no longer listed", deletes package versions that aren't in the list once they're a week old. Branches still pinned to an old copy have time to rebase, and storage stops growing with each bump.

What follows:

  1. Once this has run on main, a follow-up PR switches CI to the new path and digests.
  2. A later one removes the old ghcr.io/docspring/mirror/* packages (the 12.3 GB).

This PR changes only the mirror workflow and its list, so CI still pulls the current copies.

actionlint is clean.

Review fixes (second commit):

  • The prune also keeps every mirror digest pinned anywhere in .github, scripts or docker. Without that, a bump or rename could delete the copy main's ci.yml still pins: versions are aged by updated_at, not by when they stopped being listed.
  • A failed version listing now gives a warning instead of passing silently.
  • The comment now says that a removed line's package is deleted by hand, and the header notes the copies are amd64-only.

…ror; prune unlisted copies after a week

crane copied every platform of each multi-arch image: 12.3 GB of private (billed) package storage for 1.3 GB CI
uses (caddy alone 4.9 GB, mostly Windows images). mirror.txt now pins each source's linux/amd64 manifest, so only
that is copied. The copies move to the per-repo path every DocSpring repo will use (<org>/<repo>/mirror/<name>, so
each repo's workflow owns its packages); CI switches to them in a follow-up once this has run on main. A new step
removes versions no longer listed once they're a week old.
…hen listing fails

From review: a bump or rename would otherwise delete the copy main's ci.yml still pins (versions older than a week
are judged by updated_at, not by when they stopped being listed). Also: say that removed lines' packages are deleted
by hand, and that the copies are amd64-only.
ndbroadbent added a commit that referenced this pull request Dec 4, 2026
…og when it fails

#217 didn't end the baselines flake: run 47389263799 (#222) still got NoSuchBucket on first uploads, after HEAD
bucket had answered. Every failure was in the burst of concurrent creates as the one test binary starts, so the
fixture now creates the bucket once per process (a tokio OnceCell), and a failed app job prints the store's log.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant