Skip to content

ci: read Docker Buildx from disk before the Linux unit tests - #14367

Merged
cv merged 5 commits into
v1from
cv/bake-tests-docker-startup
Nov 10, 2026
Merged

cv merged 5 commits into
v1from
cv/bake-tests-docker-startup

Conversation

@cv

@cv cv commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

The Linux Unit build and test job now runs docker buildx version before cargo ci test, so the unit tests' 8 s limit no longer includes the runner's first read of the Docker CLI and its Buildx plugin from disk.

Problem

On some hosted runners, bake::agent_builds_default_to_the_host_platform_and_reject_others and bake::amd64_builds_every_harness take 4 to 9 s instead of about 1.5 s; on a v1 push they took 9.0 s and 8.6 s and failed linux_amd64 / Unit build and test. They sort first among the Bake tests, start together, and make the job's first Docker calls. Each of those calls reads the Docker CLI (43 MB) and the Buildx plugin (68 MB) from the runner's disk while the test run keeps the runner's four CPUs busy; later calls find both in the page cache and take 0.1 to 0.5 s.

The delay depends on the runner, not the Ubuntu version: on ubuntu-24.04, before #14355 moved the job to ubuntu-22.04, the same tests took 4.6 s and 4.2 s in one run.

Change

  • A Load Docker Buildx from disk step in bundle-platform.yml runs docker buildx version on Linux after the build and before the tests. It ignores a failure, because the Bake tests skip without Docker Buildx.
  • The test budget stays at 8 s.

The Docker daemon isn't involved: docker buildx bake --print succeeds with DOCKER_HOST pointing at a missing socket, so waiting for the daemon, or giving Bake what it would ask the daemon, would not shorten these tests.

Beyond CI

A temporary workflow on this branch, removed before review, measured the cause and the fix on hosted linux_amd64 runners:

  • A wrapper recorded each Docker call during cargo ci test in four runs. On one runner, an ubuntu-24.04 one, the first two concurrent docker buildx version calls took 5.5 s each while the system took about 800 major page faults, and the two tests took 6.7 s and 6.1 s. On the three ubuntu-22.04 runners, the first calls took 0.26 to 0.56 s with about 630 faults. Every later call took under 0.5 s with almost none.
  • Alone on an idle runner, the first docker buildx version took 0.3 to 0.7 s, and 2.7 s on an ubuntu-22.04 runner after writing 6 GB that wasn't yet flushed.
  • Both images have Docker 28.0.4 and Buildx 0.38.1.
  • With the new step, in eight runs (six ubuntu-22.04, two ubuntu-24.04), the step took 0.09 to 2.2 s, the tests' first Docker calls took at most 0.22 s, and no Bake test took more than 2.5 s, including the wrapper's overhead.

Unverified: the step moves the disk read rather than removing it, so the job's wall time keeps it; eight runs may not include a runner as slow as the one that took 9.0 s.

@cv

cv commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator Author
Authoring session — opening
Field Status Value Evidence or limit
Harness partial pi 1.5.0 Version from the harness install path in the system prompt; the session record has no version field
Skills recorded nemoclaw-contributor-create-pr (complete read) Skill reads to cutoff
Instruction files recorded AGENTS.md (injected); WRITING.md (complete read); .github/PULL_REQUEST_TEMPLATE.md (complete read); .github/SESSION_REPORT_TEMPLATE.md (complete read) Startup injection and reads to cutoff
Tool calls partial typescript: 56 Includes failed calls; the typescript wrapper hides its nested git, gh, and shell calls
Session window recorded 2026-11-10T18:35Z to 2026-11-10T19:24Z; 49 min First event to cutoff, including idle time
Compactions recorded 0 Complete record to cutoff
Models recorded claude-opus-5-5 Model change event; no changes
Reasoning levels recorded high Thinking level event; no changes

@cv

cv commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator Author

Run references for the measurements in the description (internal runs):

  • Failing v1 push: run 42862365897, linux_amd64 / Unit build and test (9.0 s and 8.6 s); earlier slow runs: 42810523918 (ubuntu-22.04, 5.0 s and 4.4 s) and 42788468139 (ubuntu-24.04, 4.6 s and 4.2 s).
  • Diagnostic without the step, Docker calls recorded during cargo ci test: run 42878685129 (its unit ubuntu-24.04 1 job is the 5.5 s runner); isolated cold-start probes: runs 42877948681 and 42878685129's synthetic jobs.
  • Diagnostic with the step: run 42881645119, eight unit jobs.

@github-actions

Copy link
Copy Markdown
Contributor

@cv
cv merged commit 8c8facc into v1 Nov 10, 2026
68 checks passed
@cv
cv deleted the cv/bake-tests-docker-startup branch November 10, 2026 19:44
cv added a commit that referenced this pull request Nov 11, 2026
Brings the contributor guides, three skills, and four workflow comments
in line with what `v1` does now, for maintainers who run or change CI
and the test suites. Only documentation and comments change.

## Problem

An audit of `internal-docs/`, `.agents/skills/`, `AGENTS.md`,
`WRITING.md`, and the comments in `.github/workflows/` and
`.github/actions/` against the commits in `v0.1.0-rc9..origin/v1` and
the current code found statements that no longer hold:

- `testing.md` gave the old contract budgets for
`fabric-provider::contract` (25/10/20 s) and
`nemoclaw-provider::contract` (45/8/16 s); `.config/test-budgets.yaml`
and `.config/nextest.toml` now set 32/16/32 s and 82/12/24 s.
- `testing.md` still described an offline runtime-rebuild test in the
`live-docker` profile, which went away with the runtime builder; every
test in that profile now uses Docker and runs in the `docker-engine`
group. It also said the `live-docker` report joins "four" nextest
commands, while the same page counted five; since #14238 the count
depends on the selected Docker HCL cases, which `--hcl-cases` names, and
the page didn't mention that option's rules.
- `testing.md` said `changes live-images` looks for a commit that pushed
"all four images"; `LIVE_PULLED` in `crates/nemoclaw-build/src/ci.rs`
has three (OpenClaw, Hermes, dummy) since #14250.
- `testing.md` said Docker and Kind jobs restore the shared Rust cache.
Since the live suites run from archives (`.github/actions/live-suite`),
only `E2E build images` restores it; Live / HCL's `Build` job uses its
own `hcl-deps-v1` prefix.
- `testing.md` and `live-tests.md` said a manual dispatch needs the
workflow on the default branch, as GitHub's documentation says, and so
told readers to run the advisory check locally and Live / Brev only
through a pushed branch. GitHub has accepted dispatches of `CI /
Dependencies` on a feature branch, including the advisory step, and of
`Live / Brev` on `v1`, although `main` is the default branch; the
evidence comment links the runs. `brev.yml` made the same claim in a
comment.
- `testing.md` didn't mention CI / Dependencies' `Python scripts` check,
the manual `E2E / Colossus runner connectivity` workflow (#14305,
#14340), or the Buildx warm-up before the Linux unit tests (#14367).
- `testing.md` told authors to report commands and results in the PR,
and `documentation.md` asked for `docs:` commits that explain "the
decision and validation"; #14214 changed the template to Problem,
Change, and Beyond CI, and `AGENTS.md` now sends local check results to
whoever asked for the change.
- `live-tests.md` placed the three hosted HCL cases on Live / HCL;
#14238 moved them to CI / Bundle's `E2E HCL CASE` jobs on Linux AMD64.
- `integration-tests.md` said the GTC DC Kubernetes scenario plans
against an existing gateway and that its HCL equivalent isn't planned.
#14315 made the example install a managed Kubernetes gateway, added
`gtc-dc-kubernetes-amd64-hcl`, which plans
`examples/kubernetes/hosted-nvidia.tf`, let the runner take a single
`.tf` file, and kept a managed Kubernetes gateway's endpoint when
redirecting to the fixtures.
- `integration-tests.md`'s `nemoclaw-provider` contract table missed
`gpu_requests` (#14401), `readiness_refs`, and `references`.
- Workflow comments: `e2e-platform.yml` referred to a "required E2E
check" and said no required check depends on the live suites, though a
failed suite fails `Test / PLATFORM`; `image-build.yml` said the live
suites pull the proxy image; `hcl-e2e.yml` said the hosted cases run "on
every run", though they run only when selected and not on forks' pull
requests.
- Skills: `add-fabric-harness` omitted the `read_write` key that
`image/fabric/catalog.py` accepts in `adapters.json` (#14037);
`write-tests`' `tofu test` reference omitted single-file HCL modules;
`verify-yaml-deployment` said all committed examples use ports
17901–17909 and 172.30.180–188, which only the GTC DC examples do.

## Change

- `internal-docs/contributing/testing.md`: the budgets, the
`docker-engine` group, the `live-docker` commands and `--hcl-cases`
rules, the image count, the opt-in `live-images` step, the `tools/ci`
push path and `Python scripts` check of the dependency workflow, the
dispatch command for the advisory step, the Colossus workflow, the
Buildx warm-up, the cache-sharing paragraph, and the reporting rule
above.
- `internal-docs/contributing/live-tests.md`: the runner of the hosted
cases, and how to run Live / Brev on `v1`.
- `internal-docs/contributing/integration-tests.md`: the module sources,
the Kubernetes endpoint exception, both GTC DC Kubernetes rows, and
three contract-table rows.
- `internal-docs/contributing/documentation.md`: the pull request title
and description rule.
- `.agents/skills/`: the three skill corrections above.
- `.github/workflows/{e2e-platform,image-build,hcl-e2e,brev}.yml`:
comments only.

Checked and left unchanged: `configuration-schema.md` (paths, commands,
generator behavior), `releases.md` (the 11 agent packages match
`HARNESSES` in `docker-bake.hcl`; the prune keeps 10 commits),
`image-assessment.md` (Syft 1.55.0, Grype 0.121.0, the 72-hour database
limit, the 120-second timeout, and the acceptance test's name),
`agent-image-maintenance.md`, `documentation-build.md`, the design
records' pins and source paths (OpenShell revision `5d25211b`, Helm
provider 3.3.0), the kind and interface scenario details in
`live-tests.md` against their `.tftest.hcl` files, `AGENTS.md`,
`WRITING.md`, the PR creation skill, and the historical evidence pages.

Left out, because they are outside this audit's scope:

- #14414: `.github/actions/setup-docs/action.yml` restores
`cache-prefix: native-bundle-v3`, but the bundle job has written
`native-bundle-v4` since #14355, so documentation builds restore no
current cache. `testing.md` now says so and links the issue.
- #14415: the comments in `.config/nextest.toml` and
`.config/test-budgets.yaml`, and the `cargo ci` step help in
`crates/nemoclaw-build/src/main.rs`, are stale in the same way as
`testing.md` was.

## Beyond CI

A local check of every relative link and heading anchor in
`internal-docs/`, `.agents/`, `AGENTS.md`, `WRITING.md`, and
`.github/*.md` found no broken target; `fern check` covers only the
published pages.
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch labels Nov 12, 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 chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants