Skip to content

ci(giga-1): publish a mock_balances image alongside the vanilla one - #4200

Merged
bdchatham merged 6 commits into
giga-1from
brandon/giga1-ecr-mock-balances
Sep 16, 2026
Merged

bdchatham merged 6 commits into
giga-1from
brandon/giga1-ecr-mock-balances

Conversation

@bdchatham

Copy link
Copy Markdown
Contributor

Stacked on #4175. Base retargets to giga-1 automatically once that merges.

Why

giga1-ecr passes no build tags, so it publishes the vanilla binary. harbor's giga-testnet needs the mock_balances variant: that build credits every account, which is what lets a load generator skip a funding step for hundreds of thousands of accounts.

Without this, the only mock-balance tags available are mock-giga-1-<full sha> and the floating mock-giga-1, from the older giga-ecr workflow. Neither can be selected by a Flux numerical ImagePolicy — a 40-character hex digest carries no ordering, and a floating tag produces no new tag name for automation to notice. That is why the existing giga-testnet chain has sat paused naming an image nothing replaces.

What

One matrix variant, matching the shape giga-ecr.yml already uses:

variant build tags tag
vanilla none giga1-<ts>-<sha7>
mock_balances mock_balances mock-giga1-<ts>-<sha7>

The timestamp stays the committer date, as #4175 wrote it. Two builds that finish out of order still sort by commit, which is what a numerical policy needs.

The build cache is keyed per variant (build-cache:giga1-<variant>). The build tags change the compiled output, so one shared cache would miss on every run and evict the other variant.

Checks

  • yaml.safe_load parses; the matrix resolves to ['vanilla', 'mock_balances']
  • actionlint reports clean

Not in this PR

Once this lands, three container builds run on every push to giga-1: two from giga-ecr and two from giga1-ecr, of which two produce the same vanilla binary under different tags. Reconciling the two workflows is worth doing and belongs to whoever owns the publish path — I did not want to fold it into a change that is otherwise additive.

🤖 Generated with Claude Code

bdchatham and others added 5 commits September 15, 2026 14:38
nightly-ecr.yml checks out a hardcoded `ref: main`, so it can never build this
branch. This builds the pushed commit and publishes one vanilla image as
giga1-<YYYYMMDDHHMMSS>-<sha7>, consumed by harbor's giga-testnet chain through
Flux image automation (sei-protocol/platform#PR).

Timestamp, not a date: this builds on push, so more than one image shares a day
and the platform ImagePolicy's numerical order cannot break a tie. The giga1-
prefix keeps these images out of the three anchored nightly policies.

The tag only exists once `seid version` has run in the built image, so Flux
cannot deploy a binary that never started.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… filter

Review findings.

Wall-clock tagging broke the ordering invariant on a re-run: a re-run of an
older commit executes date -u again and mints a tag that sorts above everything
published since, so the numerical ImagePolicy rolls giga-testnet back onto the
older binary. cancel-in-progress makes a cancelled older run the likeliest
re-run target. The committer date makes the tag a pure function of the commit,
so a re-run recomputes the same tag.

'**/*.md' cannot match root-level markdown: ** matches zero characters, leaving
a pattern that needs a leading slash. AGENTS.md and README.md are what this
repo churns, so docs-only commits were still publishing and rolling all four
validators. '**.md' is the documented idiom and a strict superset.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
giga1-ecr published one variant with no build tags, so it produced the vanilla
binary. harbor's giga-testnet needs mock_balances: that build credits every
account, which is what lets a load generator skip a funding step for hundreds of
thousands of accounts.

A matrix variant rather than a second workflow, matching the shape giga-ecr
already uses. The tag takes a mock- prefix, so the timestamped ordering the Flux
numerical policy needs works for both: giga1-<ts>-<sha7> and
mock-giga1-<ts>-<sha7>.

The build cache is keyed per variant. The build tags change the compiled output,
so one shared cache would miss on every run and evict the other variant.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Sep 16, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
CI/publish workflow only; no application runtime or auth logic changes, only additive container tags and build args.

Overview
The giga1-ecr workflow now runs a two-variant matrix (vanilla and mock_balances) on each push to giga-1, matching the pattern already used in giga-ecr.yml.

Each variant gets its own ECR tag prefix (giga1-<ts>-<sha7> vs mock-giga1-<ts>-<sha7>), passes GO_BUILD_TAGS into the Docker build for the mock variant, and uses separate registry build caches (giga1-vanilla / giga1-mock_balances) so tagged builds do not invalidate each other. Job names and step summaries include the variant name for clarity.

Reviewed by Cursor Bugbot for commit ddc7360. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedSep 16, 2026, 12:39 PM

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, additive CI change: giga1-ecr becomes a two-variant matrix that publishes a mock_balances image alongside the vanilla one, with per-variant tag prefix and build cache. Verified the empty GO_BUILD_TAGS for the vanilla variant reproduces the pre-change build, the mock_balances tag is real and guarded in the Go tree, the interpolated shell value goes through an env: block, and the matrix shape matches the existing ecr.yml convention.

Findings: 0 blocking | 0 non-blocking | 0 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • None at the file/PR level.

Base automatically changed from feat/giga1-ecr-publish to giga-1 September 16, 2026 12:20
…ock-balances

# Conflicts:
#	.github/workflows/giga1-ecr.yml
@bdchatham
bdchatham added this pull request to the merge queue Sep 16, 2026
Merged via the queue into giga-1 with commit b246520 Sep 16, 2026
58 checks passed
@bdchatham
bdchatham deleted the brandon/giga1-ecr-mock-balances branch September 16, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants