Skip to content

feat(release): stage the release on EC2, publish it from the GitHub runner - #804

Open
charlielye wants to merge 2 commits into
mainfrom
cl/stage-then-publish
Open

charlielye wants to merge 2 commits into
mainfrom
cl/stage-then-publish

Conversation

@charlielye

Copy link
Copy Markdown
Collaborator

Moves aztec-node's public release to aztec-packages' model: the build stages, and a simple GitHub job publishes. With npm trusted publishing, the NPM_TOKEN secret can then be deleted.

Before merging (the first nightly after merge is the first real run):

  1. ci3#43 merged, and the ci3 pin here moved to its merge commit (it currently points at the PR head).
  2. iac#91 applied: lets the release role write the install and playground buckets and invalidate the playground distribution.
  3. Every @aztec-labs package trusts aztec-labs-eng/aztec-node, release.yml, environment release on npmjs.

What changes

  • release job (EC2): each arch pushes its own docker images, as before. The amd64 job no longer publishes anything else: it stages the npm tarballs (ci3 deploy_npm pack mode), the playground build and the aztec-up installer lock under release-out/ and uploads that to the release cache as release-$REF_NAME.tar.gz. A dry run stages but doesn't upload. NPM_TOKEN and the aztec-nr deploy key are no longer passed to it.

  • New publish job (GitHub runner, environment release): ./bootstrap.sh publish downloads the bundle and publishes, in order:

    1. the aztec-nr mirror (from the tagged checkout; still first, so a missing aztec-nr tag aborts the release);
    2. npm, via ci3 npm_publish_packed: trusted publishing with --provenance, in dependency order, only @aztec-labs packages at exactly the tag's version;
    3. the aztec-up installer and aliases;
    4. the playground and its CloudFront invalidation;
    5. the multi-arch docker manifests.

    A re-run skips what's already out.

  • Private releases are unchanged. They still publish from the build, and ci.sh release still assembles their manifests.

  • The aztec-up and playground release functions are split into stage (release) and publish <dir>.

  • Slack failure notices from both jobs go through .github/release_failure_notify.sh.

  • The aztec-up versioned files and the playground index are now written through files, not pipes. In a dry run do_or_dryrun reads no input, so the old pipes died of SIGPIPE (exit 141).

  • RELEASES.md describes the two jobs and trusted publishing.

Testing

  • Ran ./bootstrap.sh publish with DRY_RUN=1 locally on a fake bundle in the local cache dir, with npm and docker stubbed. The aztec-nr dry run did only anonymous reads of the public mirror. All five steps ran in order; @aztec-labs/foundation published before @aztec-labs/stdlib, which depends on it. aztec-up uploaded the same files and aliases as the old release, and refused a lock built for another version. The playground found distribution E3O2N77GNVSX7F, the one iac#91 grants.
  • npm_publish_packed has its own tests in ci3#43.
  • Not run locally: the EC2 staging half, which needs a full build. Its pieces (deploy_npm pack mode, cache_upload) are the ones aztec-packages' releases use.

After it ships

  • Delete the NPM_TOKEN secret. v6 releases still use it, so delete it only after the v6 backport, or accept that v6 can't release until then.
  • Remove S3ReleaseSitesWrite from the release build instances in iac.
  • Backport to v6 as a follow-up. v6 has ci3 as a submodule, but its pin predates deploy_npm's pack mode and v6 has none of the source_release_target layout, so it needs a ci3 repin as well as this change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DSxF9AgGYcAcCTjXEeJT4L

…unner

The release build no longer holds the npm token or the aztec-nr mirror's deploy key. Each EC2 job
pushes its arch's docker images; the amd64 job stages the npm tarballs (deploy_npm's pack mode), the
playground and the aztec-up installer lock into the release cache. A new publish job in release.yml
downloads that bundle and publishes, in order: the aztec-nr mirror, npm via trusted publishing with
provenance (ci3's npm_publish_packed), the aztec-up installer and aliases, the playground, and the
multi-arch docker manifests. A private release is unchanged.

Also writes the installer's versioned files and the playground's index through files rather than
pipes, so a dry run no longer dies of SIGPIPE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DSxF9AgGYcAcCTjXEeJT4L
@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5 · Fix the missing installer versions file before merging; newly published versions cannot be installed.RetriggerView in GreptileConfidence Score: 4/5

[High impact] The public release path now publishes several user-facing artifacts from a new runner job.

Fix the missing installer versions file before merging; newly published versions cannot be installed.

FindingsFix All in Claude CodeFindings

  1. P1 New installs lack required versions ▶

Summary

Moves public releases into two jobs:

  • Public releases build on EC2 and publish from a GitHub runner.
  • The installer and playground publish from staged release files.
  • Release failure notices name whether the build or publisher stopped.

The installer’s generated versions file does not cross that boundary. This must be fixed before merging because new installs require it.

Static review only; no release was executed.

Acknowledged by charlielye: the ci3 pin must move to its merge commit, the AWS changes must be applied, and npm trusted publishers must be configured before merging. The v6 backport, npm-token deletion, and removal of build-instance bucket permissions are explicitly deferred.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Release tag] --> B[EC2 builds amd64 and arm64]
  B --> C[Push per-architecture Docker images]
  B --> D[Stage npm, playground, and installer lock]
  D --> E[Release cache]
  E --> F[GitHub publish job]
  F --> G[aztec-nr mirror]
  G --> H[npm packages]
  H --> I[Installer and aliases]
  I --> J[Playground]
  J --> K[Multi-architecture Docker manifests]
  C --> K
Loading

Reviews (1) · Last reviewed commit: "feat(release): stage the release on EC2,..." · Reviewed by Greptile

Comment thread aztec-up/bootstrap.sh Outdated
Comment on lines +287 to +288
mkdir -p "${RELEASE_DIR:?set by the root release}/aztec-up"
cp "$release_lock" "$RELEASE_DIR/aztec-up/packages.tar.gz"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 New installs lack required versions

release stages only packages.tar.gz, but publish uploads the other installer files from a fresh checkout. bin/0.0.1/versions is ignored by git and created only during build, so the GitHub runner never uploads it. The installer requires that file before installing anything, so new installs fail even though publishing succeeds.

Stage the generated versions file alongside the lock and upload it from the staged directory.

Fix in Claude Code Fix in Conductor

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Right, fixed in 5508db8: release now stages every installer file from the build (including the generated versions) under aztec-up/bin in the bundle, and publish uploads from there, refusing a bundle without versions before any upload. A dry run now uploads the same seven files the old EC2 release did.

…release

The publish job's checkout has no build, so it lacks aztec-up/bin/0.0.1/versions, which the build
generates and the installer needs. Stage every installer file from the build and upload from the
bundle; publish refuses a bundle without the versions file before uploading anything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DSxF9AgGYcAcCTjXEeJT4L
@charlielye
charlielye requested review from randyquaye and removed request for Thunkar, fcarreiro, nchamo and nventuro December 3, 2026 15:51

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant