Skip to content

ci(loadgen): publish buzz-loadgen as ghcr.io/block/buzz-loadgen - #8717

Merged
TheSentinel454 merged 3 commits into
mainfrom
tornquist/loadgen-image
Oct 30, 2026
Merged

TheSentinel454 merged 3 commits into
mainfrom
tornquist/loadgen-image

Conversation

@TheSentinel454

@TheSentinel454 TheSentinel454 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

buzz-loadgen (#8636) has no container image, so you can't run it as a Kubernetes Job. The relay Dockerfile builds only buzz-relay, buzz-admin, and buzz-pair-relay.

This PR adds:

  • Dockerfile.loadgen. It builds a static musl buzz-loadgen on the same pinned rust:1.98-alpine3.22 base that Dockerfile.sprig uses, then copies it into pinned alpine:3.22 with ca-certificates. Each native-arch build runs buzz-loadgen --help after strip. The image runs as numeric UID/GID 10001 so runAsNonRoot can verify it, and buzz-loadgen is the entrypoint.
  • .github/workflows/loadgen-image.yml, modeled on sprig-image.yml. It builds natively on amd64 and arm64, pushes by digest, merges a multi-arch manifest, and attests provenance.
    • Pushes to main that touch buzz-test-client, buzz-ws-client, buzz-core, or the workspace manifests publish :main and :sha-<7>.
    • PRs that touch the Dockerfile or workflow build without pushing an image. Same-repo PRs still write the registry build cache (buzz-loadgen-buildcache), as sprig-image.yml does.
    • Crate changes are only built on main, so a change that breaks the musl build first fails on the main push. Sprig makes the same tradeoff.
    • You can also publish manually with workflow_dispatch.
  • A short paragraph in perf/LOADGEN.md covering the image and how to pass shard arguments.

Why it's not in the relay image: that would ship a load tool in every production relay image. It would also make commits that only touch the test client count as relay-image changes.

Rollout

Merging triggers the first publish.

  1. GHCR creates the package as private. An org admin makes ghcr.io/block/buzz-loadgen public once, the same as buzz-sprig.
  2. Check the first publish:
    • docker buildx imagetools inspect ghcr.io/block/buzz-loadgen:main lists amd64 and arm64.
    • gh attestation verify oci://ghcr.io/block/buzz-loadgen:main --owner block passes.
    • An anonymous docker pull works once the package is public.
  3. Rollback: revert the workflow. Nothing consumes the image yet.
  4. The PR author watches the first main run and the first Job that uses the image.

Simpler or more complex: this adds two files and no Rust changes. The workflow has fewer moving parts than sprig-image.yml: no semver tags, no :latest, and no image-name override variable.

Related issue

None found. Follows #8636.

Testing

  • PR CI built both architectures natively.
  • An arm64 local docker build at 2c18186a:
    • --help exits 0. The image config is User=10001:10001, and the container runs as uid 10001.
    • A missing scenario exits 1, --shard 5/2 exits 2, and malformed TOML exits 1 with the parse error.
    • seed against an address with no listener exits 1 with "Connection refused".
    • The system store loads its CA roots: https://example.com completes the handshake, and a self-signed host is rejected with UnknownIssuer.
  • The build-stage --help check runs on both architectures in CI from c24ee76b on.
  • Not yet exercised: kubelet runAsNonRoot admission. The first Indexed Job is that check.

🤖 Generated with Claude Code

TheSentinel454 and others added 2 commits October 29, 2026 19:33
buzz-loadgen has no image, so it cannot run in a cluster. Add a separate
Dockerfile.loadgen (static musl binary on alpine, non-root) and a
loadgen-image.yml publisher modeled on sprig-image.yml: native amd64 and
arm64 builds pushed by digest, merged into a multi-arch manifest with
provenance. Main pushes that touch the loadgen's crates publish :main and
:sha-<7>; PRs that touch the Dockerfile or workflow build without pushing.

Kept out of the relay image so production relay images don't carry a
load tool and test-client-only commits don't count as relay changes.

Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Luke Tornquist <tornquist@squareup.com>
USER loadgen is a name, so a pod with runAsNonRoot: true fails to start:
the kubelet cannot verify a non-numeric user is non-root. Create the user
with a fixed UID/GID and set USER to the numbers.

Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Luke Tornquist <tornquist@squareup.com>
@TheSentinel454
TheSentinel454 marked this pull request as ready for review October 29, 2026 23:44
@TheSentinel454
TheSentinel454 requested a review from a team as a code owner October 29, 2026 23:44
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated, security-focused review generated by Codex.
Use it as a supplement to human review; false positives are possible.

Scope

  • Exact PR diff: ef4130da4bfeea9fe37477d621166675e0ab3ef7...c24ee76b0378950cb16e21f1fb568468892047c4
  • Model: gpt-6.1-sol

💡 Click "edited" above to see earlier reviews for this PR.


Review Summary

Overall Risk: NONE

No concrete security, correctness, or reliability findings in the authorized PR range.

Findings

No concrete security, correctness, or reliability findings were identified.

Notes

  • Review used read-only source and history inspection. Builds, tests, container execution, and network verification were not performed.

Generated by Codex Security Review |
Requested by: @TheSentinel454 |
Workflow run

Review follow-ups. Run `buzz-loadgen --help` after strip in the builder so
each native-arch CI build proves the binary starts. Add .cargo/config.toml
to the publish path filter since its [env] affects release builds. Note
in the workflow that same-repo PRs still write the build cache, and in
LOADGEN.md to pin :sha-<7> for comparable runs and point --report at a
writable mount (the container has no writable working directory).

Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Luke Tornquist <tornquist@squareup.com>
@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Oct 29, 2026
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Oct 29, 2026
@TheSentinel454
TheSentinel454 merged commit ef0fce8 into main Oct 30, 2026
45 checks passed
@TheSentinel454
TheSentinel454 deleted the tornquist/loadgen-image branch October 30, 2026 00:33
shu-hui-cash added a commit that referenced this pull request Oct 30, 2026
…nity-storage-calculation

* origin/main:
  fix(mobile): resolve iOS pushes on a fresh connection and retry a stale one (#8722)
  ci(loadgen): publish buzz-loadgen as ghcr.io/block/buzz-loadgen (#8717)
  test(relay): fix main's build after the test-state helper rename (#8718)
  fix(db): keep lease releases durable and deflake PostgreSQL lane tests (#8676)
  test: dedupe collect_until_eose by event id and uncap two shell tests (#8677)
  ci: cache the Tauri apt .debs and fit a cold Windows Rust run in its cap (#8679)
  test(desktop): gate flaky E2E specs on the state they assume (#8681)
  test(desktop): settle composer edits and press hover-only row actions by keyboard (#8682)

Signed-off-by: Shu Hui <shu@squareup.com>
ravarora2 added a commit that referenced this pull request Oct 30, 2026
…vent-guards

* origin/main: (29 commits)
  Restyle community invitations (#8728)
  feat(relay): add incremental artifact reads (#8523)
  fix(mobile): show agent DM typing and balance reply bubble padding (#8731)
  perf(relay): route author- and #p-scoped global subscriptions by selector (#8666)
  fix(desktop): fix the product races behind four E2E flakes (#8680)
  test(scripts): stop file-size fixtures leaking git repos and fsmonitor daemons (#8727)
  test(mobile): keep late callbacks and fixed sleeps from failing tests (#8678)
  fix(mobile): resolve iOS pushes on a fresh connection and retry a stale one (#8722)
  ci(loadgen): publish buzz-loadgen as ghcr.io/block/buzz-loadgen (#8717)
  test(relay): fix main's build after the test-state helper rename (#8718)
  fix(db): keep lease releases durable and deflake PostgreSQL lane tests (#8676)
  test: dedupe collect_until_eose by event id and uncap two shell tests (#8677)
  ci: cache the Tauri apt .debs and fit a cold Windows Rust run in its cap (#8679)
  test(desktop): gate flaky E2E specs on the state they assume (#8681)
  test(desktop): settle composer edits and press hover-only row actions by keyboard (#8682)
  test(desktop): measure inline video controls against their player (#8683)
  relay: open the search pool lazily so a dead reader can't block boot (#8662)
  fix(mobile): address #8650 second-pass review (#8691)
  Revert "fix(mobile): push every message in your own Solo chats (#8615)" (#8690)
  fix: don't notify workflow owners through their attribution tag (#8694)
  ...

Signed-off-by: Ravneet Arora <rarora@squareup.com>

This branch was previously deployed

1 inactive deployment
codex-review — c24ee76b Deployed Oct 29, 2026 by TheSentinel454 via Run Codex Security Review #10795
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-security-review-current The posted Codex security review matches its recorded range.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants