ci(sandbox): production release from CI; the image push logs itself in

Merged
SA
2mo ago
+139-41

What

  • Production release job. The Sandbox workflow's dispatch input becomes a choice. real-sandbox is the old behaviour. production-release runs bun run release --production on a runner, from main only, one at a time: it builds and pushes the image, rebuilds the internal golden, probes a fork and repoints production's environment rows.
  • The image push logs itself in. bun run image mints a registry credential from VERCEL_SANDBOX_TOKEN and pipes it to docker login. This is the same exchange vercel vcr login makes. The CLI can't do it in CI because it looks up a user, and the project token has none. The build then pushes with the same buildx output the CLI used (zstd, OCI media types).

Why

The release needs Docker, the registry, Neon and the sandbox secrets. On a laptop that meant a 12-hour registry login and an arm64 machine emulating amd64. On a runner every input comes from repo secrets and the build is native.

Verified

  • The project token mints the credential (200). The credential's claims name team superset-sh and project sandboxes.
  • SANDBOX_IMAGE_TAG=push-check bun run image built and pushed through the new login from a laptop. The tag showed up in the registry and was then deleted. latest was not touched.
  • The production-release job itself can only run from main, so its first run is after the merge. Every step before the image push is harmless if it fails: the bundle upload is content-addressed and rows are written last.

https://claude.ai/code/session_01FK6rLzBEUiHHXZWNmpQ2BP


Summary by cubic

Moves the Sandbox production release off laptops and into CI. The workflow's dispatch input is now a choice; production-release (main only, one at a time) runs bun run release --production on a runner with all secrets from the repo. Image pushes log Docker into Vercel Container Registry themselves with a credential minted from VERCEL_SANDBOX_TOKEN, replacing the 12-hour vercel vcr login docker session (the CLI needs a user account, which the project token does not have).

Verified

  • SANDBOX_IMAGE_TAG=push-check bun run image built and pushed through the new login from a laptop; the tag was deleted and latest untouched.
  • The token mints the credential (200) with claims naming team superset-sh and project sandboxes.
  • Dispatch production-release after a merge to main; every step before the image push is harmless if it fails, and environment rows are written last.