ci(giga-1): publish a seid image on every push to giga-1 - #4175
Conversation
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>
PR SummaryMedium Risk Overview Images are tagged Reviewed by Cursor Bugbot for commit bfb7870. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
There was a problem hiding this comment.
Adds a new giga1-ecr.yml workflow that builds, smoke-tests and publishes one vanilla seid image per push to giga-1. The structure mirrors nightly-ecr.yml and the build-then-smoke-then-push ordering is sound; two non-blocking issues concern tag ordering on reruns and the markdown path filter.
Findings: 0 blocking | 2 non-blocking | 2 posted inline
Blockers
- None at the file/PR level.
Non-blocking
- None at the file/PR level.
- 2 suggestion(s)/nit(s) flagged inline on specific lines.
| set -euo pipefail | ||
| SHA=$(git rev-parse HEAD) | ||
| SHA7=$(git rev-parse --short=7 HEAD) | ||
| TS=$(date -u +%Y%m%d%H%M%S) |
There was a problem hiding this comment.
[suggestion] The timestamp comes from wall clock at build time, not from the commit, so the "newest tag = newest commit" invariant the header comment relies on does not survive a rerun. A GitHub re-run reuses the original commit and ref (so the Refuse a ref that is not giga-1 guard still passes) but executes date -u again, producing a tag that sorts above every tag published since — and the numerical ImagePolicy on the platform side would then roll giga-testnet back onto that older binary.
This is not hypothetical given cancel-in-progress: true: a build cancelled by a newer push is exactly the run an operator is most likely to hit "Re-run" on, and the commit it carries is by construction older than what is deployed.
Deriving the timestamp from the commit makes the tag a pure function of the commit, so a rerun republishes an identically-ordered (in fact identical) tag:
TS=$(git show -s --format=%cd --date=format-utc:%Y%m%d%H%M%S HEAD)(If you prefer to keep wall-clock tagging, the alternative is rejecting a commit that is not the current tip of giga-1 before the push step.)
| # new tag rolls all four giga-testnet validators, stopping block production | ||
| # for the restart window. Not worth it. | ||
| paths-ignore: | ||
| - '**/*.md' |
There was a problem hiding this comment.
[suggestion] '**/*.md' is not a reliable way to match repository-root markdown in a GitHub path filter: ** is documented as matching zero or more of any character, which leaves the / in the pattern needing a directory segment, and the documented idiom for "every .md file anywhere" is '**.md'. Root-level markdown is exactly what this repo churns (AGENTS.md, CLAUDE.md, README.md, CHANGELOG.md), so if the pattern does not cover them, a docs-only commit still publishes a tag and rolls all four validators — the case this filter exists to prevent.
'**.md' is unambiguous under either reading and is a strict superset of the current pattern.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1425d89. Configure here.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## giga-1 #4175 +/- ##
=========================================
Coverage ? 65.55%
=========================================
Files ? 2081
Lines ? 157563
Branches ? 0
=========================================
Hits ? 103289
Misses ? 54133
Partials ? 141
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
… 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>
|
Both findings were right. d307165 fixes them. Re-run ordering. The wall-clock tag did break the invariant the design One correction to the suggested snippet: TS=$(TZ=UTC0 git show -s --format=%cd --date=format-local:%Y%m%d%H%M%S HEAD)It is UTC-normalised (cross-checked against A re-run now recomputes the same tag, and the repository is Markdown filter. Correct, and it mattered: This workflow carries no comments by request, so both invariants live in the |

nightly-ecr.ymlchecks out a hardcodedref: main— the step is even named"Checkout main HEAD" — so it can never build
giga-1however it is invoked, andecr.ymlis branch-filtered tomain/release/**.giga-1has no publishingworkflow at all. This adds one.
Land this first. It is the producer for
sei-protocol/platform#1707, which deploys these images to a new
4-validator
giga-testnetchain on harbor. That PR'sspec.imagecarries anall-zero placeholder tag until a real
giga1-*image exists.What it publishes
One vanilla image per push to
giga-1, taggedgiga1-<YYYYMMDDHHMMSS>-<sha7>, to the existing189176372795.dkr.ecr.us-east-2.amazonaws.com/sei/sei-chainrepository. Samerepository, so the platform Pod Identity grant needs no terraform change.
Decisions a reviewer should challenge
not one a day.
concurrency: cancel-in-progress: truemeans a push during abuild cancels it, so at most one build runs and the published tag is always
the newest commit that finished.
<date>. Building on push puts more than one image in aday. The house
(?P<date>[0-9]{8})extract would tie, and a numericalImagePolicy cannot break a tie. 14 decimal digits stay inside float64's
exact-integer range, so the ordering is exact.
giga1-prefix. The three nightly ImagePolicy patterns are anchored onnightly-,mock-nightly-andmock_chain_validation-mock_balances-nightly-, and they carry no branchidentity. A bare
nightly-<date>-<sha7>tag built fromgiga-1would beselected by
sei-chain-nightlyand could bump the nightly release gate onto agiga-1build. This prefix cannot match any of them.mock_balances.giga-testnetsubmits no transactions,so no sender needs funding, and
mock_balanceswould mask the state-machineregressions the chain exists to catch. One variant also keeps the loop fast
and ECR growth low.
loadthen smoke then push. The tag only exists onceseid versionhasrun inside the built image, so Flux cannot deploy a binary that never started.
One build, so the bytes smoked are the bytes published. It does not prove the
chain reaches consensus — that gate is named as a follow-up in the platform PR.
paths-ignoreon markdown. A docs-only commit produces an identicalbinary under a new
sha7. The new tag would roll all four validators and stopblock production for the restart window.
workflow_dispatchref assertion.workflow_dispatchtakes no branchfilter, so a dispatch from another ref would publish a
giga1-tag built fromthat ref and Flux would deploy it. The first step fails loudly rather than
skipping green.
Verified
actionlint .github/workflows/giga1-ecr.yml— clean.evm.http_enabled,evm.ws_enabledandstate-store.ss-enableexist asdotted keys on this branch, and
SetEVMConfigByMode/TestTheRenderedConfigStillDiscardsTheStateStoreRulesconfirm validator modeturns all three off. That is why the platform PR sets all three.
giga_executor.enabledandocc_enabledboth default totrueingiga/executor/config, so the platform PR pins neither.Not verified
The workflow has never run. The build, the ECR push and the smoke step are
untested until this merges and
giga-1takes a push, or someone dispatches it.🤖 Generated with Claude Code