Skip to content

ci: prune per-commit images after each v1 push - #13574

Merged
cv merged 2 commits into
v1from
ci/prune-per-commit-images
Oct 23, 2026
Merged

cv merged 2 commits into
v1from
ci/prune-per-commit-images

Conversation

@cv

@cv cv commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Failure

Every image-affecting v1 push adds 22 per-commit images to ghcr.io/nvidia/nemoclaw/v1-ci (eleven images on two platforms), and nothing removed them.

Decision

Prune after each push instead of on a schedule: GitHub runs scheduled workflows only on the default branch, which is main, so a schedule on v1 would never run.

  • The job: a Prune per-commit images job runs after an image-affecting v1 push has published its images. It isn't a required check and never gates the push.

  • What it keeps: the images of the ten most recent commits, which the staging workflow promotes from, and the provision placeholder.

  • What it deletes:

    • older per-commit tags;
    • untagged versions only when they predate every kept commit, so a kept image never loses its platform manifests.

    Releases are unaffected: promotion copies each image into its own v1/<image> package.

  • Permission: deleting package versions needs the workflow's admin role on the package. GitHub's support for workflow deletions is in public preview. Without the role, the job warns and stops.

  • Docs: docs/contributing/releases.md asks for the Admin role on v1-ci (Write stays for the release packages), and no longer says an organization administrator must create the packages, since whoever creates a package administers it. docs/contributing/testing.md describes the job.

Validation

  • actionlint is clean, and fern check reported 0 errors.
  • I ran the job's selection logic against the real v1-ci package with my token, deleting nothing:
    • with the limit of ten, seven commits have images, so it would delete nothing and keep provision;
    • with a limit of two, it keeps the two newest commits and would delete 74 older tagged versions, none of them belonging to a kept commit.
  • The job first runs on the next image-affecting v1 push after merge.

After merge, nemoclaw/v1-ci's Actions access for NVIDIA/NemoClaw needs the Admin role.

@cv
cv enabled auto-merge (squash) October 21, 2026 03:22
@github-actions

Copy link
Copy Markdown
Contributor

@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance needs: rebase PR needs rebase or conflict resolution platform: container Affects Docker, containerd, Podman, or images labels Oct 23, 2026
@cv
cv merged commit 8eee7e1 into v1 Oct 23, 2026
47 checks passed
@cv
cv deleted the ci/prune-per-commit-images branch October 23, 2026 04:03
cv added a commit that referenced this pull request Oct 23, 2026
…digest (#13664)

## Failure

Staging `v0.1.0-rc3` took 41 minutes, 30 of them in the stage job,
because #13590 scans every release platform image with Syft from the
registry, one after another. That's 28 images, including about 10 GB per
vLLM platform, downloaded by a runner that built none of them. Before
SBOMs the stage job took about 2.5 minutes.

## Decision

Scan each image where it is built, and keep the result by digest.

- **`.github/scripts/image-sbom.sh`**: given a pushed image, finds its
platform manifest digest. If `v1-ci` has no `sbom-DIGEST` yet, it scans
the image with the pinned Syft (locally if Docker has it, otherwise from
the registry) and pushes the SPDX document there as a tiny `FROM
scratch` image.
- **Image workflow**: on image-affecting `v1` pushes, it records each
agent and proxy image's SBOM right after pushing it. Local scans take
about 10–30 seconds per image.
- **Staging's runtime jobs**: record the vLLM and Ollama images' SBOMs
after building them. Runtime images build reproducibly, so an unchanged
image's SBOM is already there and isn't rescanned. vLLM's scan (about
3–6 minutes) is paid only when its inputs change.
- **Staging**: copies each release platform's document from `v1-ci` with
`docker create` and `docker cp`, and falls back to the registry scan
only for an image without one, such as images pushed before this change.
- The `sbom-` tags age out with the per-commit images under #13574's
pruning.

Why not BuildKit's own SBOM attestations: tried on the proxy image,
BuildKit's scanner found 1 package where the pinned Syft with the Cargo
lockfile cataloger finds 79, including hyper, serde and tokio. It also
uses a moving tag, `docker/buildkit-syft-scanner:stable-1`.

## Validation

- Against the real `v1-ci` package, on a DGX Spark:
  - recording an Ollama proxy image's SBOM took 11 s;
  - a second run found it and skipped scanning (4 s);
- copying it out the way staging does gave an SPDX 2.3 document with 79
packages, including the Rust dependencies.
  - The package stayed internal.
- Local scan times with the same Syft: OpenClaw (4.35 GB) in 30 s, vLLM
(35.4 GB) in 200 s.
- `shellcheck` and `actionlint` are clean, and `fern check` reports 0
errors.
- The workflows themselves run at the next image-affecting `v1` push and
the next staging. Until then, staging's registry fallback covers images
without a stored SBOM.
@wscurran wscurran added the v1 NemoClaw v1 branch label Oct 27, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance needs: rebase PR needs rebase or conflict resolution platform: container Affects Docker, containerd, Podman, or images v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants