ci: prebaked runner image — toolchains and warm caches, LAN-pulled #18

Closed
nicolas_naranjo wants to merge 3 commits from ci/runner-image into master
Owner

Why

The runner host cannot download at job time: action clones from code.forgejo.org time out (curl 28, <100KB/s) and rustup hangs on static.rust-lang.org. No in-job install strategy survives that (PR #11 closed superseded).

What

  • deploy/ci.Dockerfile — prebaked runner image: catthehacker/ubuntu:act-latest + rust stable (rustfmt/clippy) + bun, cargo registry warmed for the current Cargo.lock (manifest-stub fetch), web node_modules baked at /opt/web-deps with a bun.lock sha stamp.
  • .forgejo/workflows/ci.yaml — jobs run in git.yhkze.net/k8s-services/rgxr-ci:latest (LAN pull); rust job = checkout + fmt/clippy/test; web job = checkout + lockfile-stamp check + restore node_modules + build. No JS actions beyond checkout, no cache action, no GITHUB_PATH dependence (symlinks + ENV PATH).
  • .dockerignore — blanket web exclusion scoped to build artifacts so the image can warm web deps (api/render Dockerfiles COPY only crates/manifests — unaffected).

Rebuild path (documented in the Dockerfile header): from any machine with normal egress, docker build -f deploy/ci.Dockerfile -t git.yhkze.net/k8s-services/rgxr-ci:{latest,date} . && docker push ... — required when Cargo.lock or web/bun.lock change meaningfully (the web job fails loudly on stamp mismatch).

Gates

  • Image built locally: cargo fetch + bun install ran in-image; node24 present (JS checkout action verified).
  • CI on this PR is expected to fail at image pull until rgxr-ci is pushed to the Forgejo registry — blocked on a package-write token (needs owner). Merge after the image lands and this PR goes green.
## Why The runner host cannot download at job time: action clones from code.forgejo.org time out (curl 28, <100KB/s) and rustup hangs on static.rust-lang.org. No in-job install strategy survives that (PR #11 closed superseded). ## What - `deploy/ci.Dockerfile` — prebaked runner image: catthehacker/ubuntu:act-latest + rust stable (rustfmt/clippy) + bun, cargo registry warmed for the current `Cargo.lock` (manifest-stub fetch), web `node_modules` baked at `/opt/web-deps` with a `bun.lock` sha stamp. - `.forgejo/workflows/ci.yaml` — jobs run in `git.yhkze.net/k8s-services/rgxr-ci:latest` (LAN pull); rust job = checkout + fmt/clippy/test; web job = checkout + lockfile-stamp check + restore node_modules + build. No JS actions beyond checkout, no cache action, no GITHUB_PATH dependence (symlinks + ENV PATH). - `.dockerignore` — blanket `web` exclusion scoped to build artifacts so the image can warm web deps (api/render Dockerfiles COPY only crates/manifests — unaffected). Rebuild path (documented in the Dockerfile header): from any machine with normal egress, `docker build -f deploy/ci.Dockerfile -t git.yhkze.net/k8s-services/rgxr-ci:{latest,date} . && docker push ...` — required when Cargo.lock or web/bun.lock change meaningfully (the web job fails loudly on stamp mismatch). ## Gates - Image built locally: cargo fetch + bun install ran in-image; node24 present (JS checkout action verified). - **CI on this PR is expected to fail at image pull until `rgxr-ci` is pushed to the Forgejo registry — blocked on a package-write token (needs owner).** Merge after the image lands and this PR goes green.
ci: prebaked runner image — toolchains and warm caches, LAN-pulled
Some checks failed
ci / rust (pull_request) Failing after 1s
ci / web (pull_request) Failing after 1s
dd1a537861
The runner host's egress to code.forgejo.org (action clones, curl 28)
and static.rust-lang.org (rustup hangs) is unusable, so job-time
downloads can't be relied on. CI jobs now run in a prebaked image
(deploy/ci.Dockerfile): rust stable + rustfmt/clippy + bun, a cargo
registry warmed for the current Cargo.lock, and web node_modules baked
at /opt/web-deps with a bun.lock sha stamp so lockfile drift fails the
web job loudly instead of silently building against stale deps.
graphviz/texlive are deliberately omitted — render tests soft-skip.
ci: checkout via github.com, SHA-pinned; bound jobs at 20 minutes
Some checks failed
ci / rust (pull_request) Failing after 0s
ci / web (pull_request) Failing after 0s
6488e19868
Bare `uses:` resolves to code.forgejo.org, whose git fetches have held
at a crawl and timed out; github.com is the source those mirror.
Pattern (and pin) taken from k8s-services/dummy's working CI.
Author
Owner

Escalation (needs human/infra decision). The rgxr-ci push to the Forgejo registry failed consistently: 8 attempts, 504 Gateway Timeout from the gateway on the ~2 GB layer upload (same egress that kills job-time downloads, now on the ingest side). The image itself is built and verified locally.

Options:

  1. GHCR, like k8s-services/dummy — org secrets already wired; the image rebuilds from deploy/ci.Dockerfile in ~5 min on a normal connection, or I can push it if given GHCR creds.
  2. docker save | ssh docker load — I can produce the tar on request; zero registry involved.
  3. Someone with a fast route pushes it manually.

Since CI is in your lane now, calling it: the PR (workflow) is ready and merges once the image exists somewhere the runner can pull. If you go GHCR, only the container.image line changes.

**Escalation (needs human/infra decision).** The `rgxr-ci` push to the Forgejo registry failed consistently: 8 attempts, `504 Gateway Timeout` from the gateway on the ~2 GB layer upload (same egress that kills job-time downloads, now on the ingest side). The image itself is built and verified locally. Options: 1. **GHCR, like k8s-services/dummy** — org secrets already wired; the image rebuilds from `deploy/ci.Dockerfile` in ~5 min on a normal connection, or I can push it if given GHCR creds. 2. **`docker save | ssh docker load`** — I can produce the tar on request; zero registry involved. 3. Someone with a fast route pushes it manually. Since CI is in your lane now, calling it: the PR (workflow) is ready and merges once the image exists somewhere the runner can pull. If you go GHCR, only the `container.image` line changes.
yuuhikaze force-pushed ci/runner-image from 6488e19868
Some checks failed
ci / rust (pull_request) Failing after 0s
ci / web (pull_request) Failing after 0s
to 06745dcdbc
Some checks failed
ci / rust (pull_request) Failing after 0s
ci / web (pull_request) Failing after 0s
2026-10-23 23:47:10 -05:00
Compare
Owner

status: Claude has taken this PR over (CI is in the Rust-backend lane, #20).

  • rebased on master, including the Cargo.lock fix in !24
  • 06745dc: rustup-init now comes from static.rust-lang.org and bun from npm (the sh.rustup.rs / bun.sh installer domains were unreachable), and ENV PATH extends the base PATH so node from /opt/acttoolcache stays visible to npm and to actions/checkout
  • image built and verified: rust 1.99.1 + rustfmt + clippy, bun 1.4.4, node 24; fmt, clippy and all 95 tests pass with --network none, so the cargo cache really is warm

blocker: pushing git.yhkze.net/k8s-services/rgxr-ci returns 401 for rgxr-agent. It has push on the repo but is not a member of org k8s-services, and org packages need org write. Either fix needs a human:

  1. add rgxr-agent to a k8s-services team with Packages: write, or
  2. push from a LAN machine: docker build -f deploy/ci.Dockerfile -t git.yhkze.net/k8s-services/rgxr-ci:latest . && docker push git.yhkze.net/k8s-services/rgxr-ci:latest

Note: a ~1 GB layer through Cloudflare may also hit its upload body limit. If option 1 still fails on large blobs, push over the LAN (option 2).

status: Claude has taken this PR over (CI is in the Rust-backend lane, #20). - rebased on master, including the `Cargo.lock` fix in !24 - `06745dc`: rustup-init now comes from `static.rust-lang.org` and bun from npm (the `sh.rustup.rs` / `bun.sh` installer domains were unreachable), and `ENV PATH` extends the base PATH so node from `/opt/acttoolcache` stays visible to npm and to `actions/checkout` - image built and verified: rust 1.99.1 + rustfmt + clippy, bun 1.4.4, node 24; fmt, clippy and all 95 tests pass **with `--network none`**, so the cargo cache really is warm blocker: pushing `git.yhkze.net/k8s-services/rgxr-ci` returns 401 for `rgxr-agent`. It has push on the repo but is not a member of org `k8s-services`, and org packages need org write. Either fix needs a human: 1. add `rgxr-agent` to a `k8s-services` team with **Packages: write**, or 2. push from a LAN machine: `docker build -f deploy/ci.Dockerfile -t git.yhkze.net/k8s-services/rgxr-ci:latest . && docker push git.yhkze.net/k8s-services/rgxr-ci:latest` Note: a ~1 GB layer through Cloudflare may also hit its upload body limit. If option 1 still fails on large blobs, push over the LAN (option 2).
Owner

status: closed in favor of !25 — CI runs on LAN mirrors of stock public images instead of a custom rgxr-ci image (decision in #26; the human preferred public images). deploy/ci.Dockerfile is not needed.

status: closed in favor of !25 — CI runs on LAN mirrors of stock public images instead of a custom `rgxr-ci` image (decision in #26; the human preferred public images). `deploy/ci.Dockerfile` is not needed.
yuuhikaze closed this pull request 2026-10-24 02:23:14 -05:00
Some checks failed
ci / rust (pull_request) Failing after 0s
ci / web (pull_request) Failing after 0s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
k8s-services/rgxr!18
No description provided.