Repository navigation
ci(release): dry-run the release train without publishing - #5534
Conversation
A maintainer can now build every first-party artifact of one commit the way the release train will, as a release candidate and as the final-stamped twin a final would promote, and get a manifest of exactly what a real run would publish and where, without anything being published. This is Phase 2 of the release-train plan (#5172, #5492). The dry run reuses the release's own build workflows. Each one gains optional inputs (ref, artifact_prefix, and a third desktop-app source for the Windows setup) that default to empty, so publish.yml, release_components.yml and the PR gates build exactly what they did before. Verify checks every checksum and version stamp, generates the flagship lock from this run's own builds instead of the committed placeholder, diffs each archive against its twin, and rebuilds one terminal binary to prove the Go build is reproducible. A unit test fails if the workflow gains a trigger, a secret, an environment, a write grant or a publish step.
…everted before merge)
The terminal rebuild differed only because the downloaded binaries sat inside the checkout, so Go stamped the rebuild vcs.modified=true. They now live outside it. The sdist twin-diff flagged SOURCES.txt, which lists the same 615 files in a different order because renamed Vite chunks sort differently; file listings now compare as a set of lines.
…rted before merge)
install.sh and install.ps1 verify the terminal binary against the release's gaia-tui-SHA256SUMS.txt, so a train release has to carry one. Verify now writes it for each build and lists it in the manifest.
…c3 (reverted before merge)" This reverts commit 29c16a7.
…n rc2 (reverted before merge)" This reverts commit 7ff93ee.
# Conflicts: # .github/workflows/test_unit.yml
|
Verdict: Approve with suggestions This adds a manually started dry run of the release train. It builds every first-party artifact of one commit twice, once as the release candidate and once as the final, checks checksums, version stamps, the flagship lock and the candidate-vs-final diff, and writes a manifest of what a real train would publish. It publishes nothing. The guard tests make that hard to undo by accident, and the shared build workflows only gain optional inputs that default to today's behaviour. I found nothing blocking.
Real-world evidenceN/A here: this is a CI-only change, so no evidence bundle was produced. The PR links two real green dry runs (rc2 at 🔍 Technical details🟢 Minor
Notes (no change needed)
Strengths
|
CodeQL flagged the dry run's `ref` input as cache poisoning, and it was right: a dispatch on main that checked out another commit ran that code with main's cache scope, so its npm, Go and Electron caches would be restored by later main and release builds. The dry run now builds the commit it is dispatched on (`gh workflow run --ref <branch>`), which is also what the train does on a tag. That removes the `ref` input from tui_installers.yml and windows_setup.yml and leaves build_flagship_sidecar.yml and test_agent_gaia_npm.yml untouched. build-installers.yml keeps an optional `ref`, which the dry run sets to its own commit, because its `tag` input names a version that isn't a tag yet. A test now fails if the dry run checks out any other commit.
…reverted before merge)" This reverts commit 2b197c0.
A wheel with no METADATA, a truncated tarball or a malformed lock used to stop verify with a traceback, so the manifest and every later check were lost. Each one is now a named failure in the summary, and the rest of the checks still run.
|
Both suggestions are in. The |
Today the only way to find out whether a release builds is to tag one, and the flagship agent, the terminal and the Windows setup are each built by a different workflow at a different version. With this PR a maintainer can dispatch one workflow on a branch and get every first-party artifact of its commit built twice: once as the release candidate, and once as the final twin a final would promote. Each one is verified and listed with where a real train would publish it, and nothing is published. This is Phase 2 of the release train (#5172, plan in #5492). It runs Phase 1's version check (#5508).
The shared build workflows only gain optional inputs that default to empty, so publish.yml, release_components.yml, the agent releases and the PR gates build exactly what they did before. This PR's own build-installers, terminal and Windows-setup PR gates run them with those defaults. The dry run only builds the commit it's dispatched on. An earlier version took a
refto build, and CodeQL rightly flagged that it would run other code with main's cache scope, which later release builds restore. The dry run's token is read-only except in the two Agent UI installer jobs, because build-installers.yml declarescontents: writeandid-token: writeand GitHub won't call it with less. Nothing in the dry run can use those grants: no secret is passed,publish_to_releaseis false, and a test pins both. Removing the grant means changing build-installers.yml in a way that isn't additive, so that waits until after v0.25.1 final.🔍 Technical details
Run it:
gh workflow run release_train_dryrun.yml --ref main -f rc_tag=v0.25.1-rc3What verify checks
SHA256SUMSandgaia-tui-SHA256SUMS.txt(install.sh/ps1 read the latter) for each build.package.json, Electronlatest*.yml, and the string embedded in each terminal binary. The final twin must not carry the RC string.binaries.lock.jsongenerated from this run's sidecar and terminal builds instead of the committedPENDINGplaceholders, packed into the flagship npm tarball, and checked against the built bytes.@amd-gaia/agent-uitarball and the.deb'sapp.asar, once versions and Vite chunk hashes are normalised..pkg/.deb/.rpmand Windows setup clean-runner installs, flagship npm vitest), plus a clean-venvpip installandnpm installof the core packages on Linux, Windows and macOS.Additive edits to shared workflows (every new input is
required: false, default'';test_new_callee_inputs_are_optional_and_empty_by_defaultpins it)build-installers.yml:artifact_prefix, plusref, becausetagnames a version that isn't a tag yet. An empty prefix leaves artifact names and the concurrency group unchanged, and an emptypattern:downloads every artifact as before.tui_installers.yml:artifact_prefix, and a newsidecar: artifactmode. The default is stillpinned.windows_setup.yml:artifact_prefix, andagent_ui_artifactas a third desktop-app source, with the same name, PE and size checks.What the train would publish vs v0.25.1-rc2
gaia-{linux,darwin}-x64andgaia-win-{x64,arm64}.exe, instead of publish.yml's-amd64/gaia-windows-*. The Windows ones also gain their icon and version resources, andgaia versionprints0.25.1-rc.2rather thanv0.25.1-rc2. install.sh/ps1 (ci(release): take installers from GitHub releases, stop uploading them to R2 #5509) fetch the old names, so Phase 5 has to pick one scheme for both.SHA256SUMSandrelease-manifest.json. A final would also gain the four terminal packages, the combined Windows setup and the flagship sidecars as GitHub assets.latest*.yml, Windows setup and flagship RC manifest keep their names.@amd-gaia/agent-uiis unchanged. The flagship tarball is still@amd-gaia/gaia(renamed@amd-gaia/agentwith agaia-agentbin in Phase 5). The hub only gets what the lock pins: the four sidecars and six raw terminal binaries (ci(release): take installers from GitHub releases, stop uploading them to R2 #5509).Test plan
v0.25.1-rc3: green, 51 artifacts, 48 checks, 27 min wall, 81 runner-minutes (run)0b14d740dplus these workflow files, branchci/release-train-dryrun-rc2) asv0.25.1-rc2: green, 51 artifacts, 41 min wall (the best-effort Intel Mac sidecar leg is the critical path), 100 runner-minutes (run). Green again with the final verify code: 25 min, 81 runner-minutes (run)refremoval, the same workflow was green on the rc2 commit and on main (rc2, main, rc2 again)pytest tests/unit/test_release_train.py tests/unit/test_release_train_dryrun_workflow.py: 50 tests. Each ofnpm publish, a secret, a push trigger, an environment, a write grant, a publish.yml callee andpublish_to_release: trueadded to the workflow fails the guard, and so does checking out another ref. An altered twin, a wrong stamp, a stale lock, a missing platform and an unreadable archive each fail verify.python util/lint.py --allandactionlintpass on every touched workflow and its live callersgh workflow run release_train_dryrun.yml --ref main -f rc_tag=v0.25.1-rc3is green: 51 artifacts, 48 checks, 28 min wall, 81 runner-minutes (run)The branch runs used a temporary push trigger, because a dispatch needs the file on main. It is reverted in this branch.