Skip to content

install: default server image on releases, pin Studio, and simplify quickstart - #678

Merged
mayawang merged 5 commits into
google:mainfrom
mayawang:fix/release-defaults-661
Nov 23, 2026
Merged

mayawang merged 5 commits into
google:mainfrom
mayawang:fix/release-defaults-661

Conversation

@mayawang

@mayawang mayawang commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Prepares zero-flag release ax-server installs, Studio bundling, and simplified quickstart docs on main (ready to backport onto release-0.4 for v0.4.0-rc.2):

Part of #661.
Fixes #680.

Verification

export GOTOOLCHAIN=auto
make verify                                              # buf, go mod tidy, go fmt, golangci-lint: 0 issues
go build ./cmd/ax ./cmd/ax-server ./cmd/ax-runner        # passed
go test -count=1 ./...                                   # all unit packages passed (Postgres & Kind E2E self-skip without env opt-in)
sh -n install.sh                                         # passed
go build -ldflags "-X github.com/google/ax/internal/version.Version=v0.4.0-rc.2" -o /tmp/ax-rc2-check ./cmd/ax && /tmp/ax-rc2-check local --help
# Verified --server-image prints: (default: "ghcr.io/google/ax/ax-server:v0.4.0-rc.2")

cc @MushuEE for release-defaults review.

@mayawang mayawang self-assigned this Nov 21, 2026
@mayawang
mayawang requested a review from MushuEE November 21, 2026 00:09
@rakyll rakyll added this to the v0.4.0 milestone Nov 21, 2026
@mayawang
mayawang force-pushed the fix/release-defaults-661 branch from 8b6ae6a to d6ecb1a Compare November 21, 2026 00:32
@mayawang
mayawang requested a review from yongruilin November 21, 2026 00:53
Comment thread internal/install/axdeploy/deploy.go Outdated
// return "" so they fail fast unless --server-image or $AX_SERVER_IMAGE is set.
func DefaultServerImage() string {
if version.IsRelease() {
return version.Image("ax-server")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This defaults to a mutable tag (ghcr.io/google/ax/ax-server:<tag>) and relies on EnsureDigestPinned to resolve it at install time, so the digest is trust-on-first-use per install. The TODO this replaces called for <tag>@sha256:<digest>.

Could we stamp the digest at release time instead of resolving it later? The release job already has it from needs.images.outputs.server_image, and hack/release/build-binaries.sh already stamps version.Version through go_ldflags. Passing the server digest as a second -X (e.g. version.ServerImageDigest) would let this return version.Image("ax-server") + "@" + digest on release builds, and EnsureDigestPinned returns digest-pinned refs unchanged.

That keeps the default tied to the binary's own release with nothing hardcoded in the source, and every install of a given release gets the same image. Falling back to the tag-only ref when the digest is unset would keep go build -ldflags "-X ...Version=vX.Y.Z" builds working.

Fine as a follow-up if you'd rather not hold rc.2 for it.

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.

Good call, done in 348c784. Release builds now stamp version.ServerImageDigest from needs.images.outputs.server_image and fall back to the tag-only ref when unset. Also rebased onto main for #682.

@MushuEE MushuEE left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Studio digests match the upstream v0.4.0-rc.1 checksums.txt, and the flag > $AX_SERVER_IMAGE > release default precedence looks right.

One non-blocking follow-up: hack/release/build-binaries.sh only errors when AX_SERVER_IMAGE is set but malformed. If needs.images.outputs.server_image ever comes through empty on a real tag, the released ax binary silently falls back to the mutable tag-only default instead of the stamped @sha256 digest, and nothing fails. Could we make the non-dry-run release path require a digest-pinned AX_SERVER_IMAGE (fail the Build ax CLI step when it is empty)? Fine to do in a follow-up.

Populate zero-flag release defaults for ax local/install and align
install.sh and quickstart docs around prebuilt release artifacts for
upcoming v0.4.0-rc.2 testing.

Changes:
- internal/install/axdeploy, cmd/ax: replace empty DefaultServerImage
  const with DefaultServerImage() returning version.Image("ax-server")
  for tagged release builds (version.IsRelease) so EnsureDigestPinned
  resolves its multi-arch @sha256 digest automatically, while keeping
  unversioned dev builds gated unless --server-image / $AX_SERVER_IMAGE
  is set. Keep CLI flag defaults empty in imageFlags.register so
  $AX_SERVER_IMAGE still overrides the release default when the flag is
  omitted. Keep DefaultRunnerVolumeImage empty pending google#620/google#625.
- install.sh, cmd/ax/studio_cmd_test.go: set PINNED_STUDIO_VERSION to
  v0.4.0-rc.1 with SHA-256 digests from agentexecutor/studio v0.4.0-rc.1
  checksums.txt, update next-step hint to 'ax local start', and add
  consistency tests alongside the unpinned skip test.
- README.md, docs/development.md, docs/local_installer.md,
  docs/releasing.md: remove source image builds from README Quick start
  into docs/development.md#build-and-push-images, update ax local start /
  ax install quickstart snippets to zero-flag defaults, and document
  dev-build overrides.

Verification:
- export GOTOOLCHAIN=auto && make verify (0 lint issues; no git diff)
- go build ./cmd/ax ./cmd/ax-server ./cmd/ax-runner
- go test -count=1 ./... (all unit packages passed; live Postgres and
  Kind E2E tiers self-skip without AX_TEST_POSTGRES_URL / AX_E2E=true)
- sh -n install.sh
- go build -ldflags "-X github.com/google/ax/internal/version.Version=v0.4.0-rc.2" -o /tmp/ax-rc2-check ./cmd/ax && /tmp/ax-rc2-check local --help (prints default ghcr.io/google/ax/ax-server:v0.4.0-rc.2)

Part of google#661
Document in README.md and docs/local_installer.md that prebuilt agent images with no runner baked in (such as Antigravity) require --runner-volume-image (or $AX_RUNNER_VOLUME_IMAGE) set to the ax-runner-volume digest from the release notes.

Verification:
- export GOTOOLCHAIN=auto && make verify (0 lint issues; no code/generated diff)
- go build ./cmd/ax ./cmd/ax-server ./cmd/ax-runner
- go test -count=1 ./... (all unit packages passed; Postgres and Kind E2E tiers self-skip without env opt-in)

Part of google#661
Keep google#666's localhost registry reference from README.md in docs/development.md#build-and-push-images alongside make images.

Verification:
- export GOTOOLCHAIN=auto && make verify (0 issues)
- go build ./cmd/ax ./cmd/ax-server ./cmd/ax-runner
- go test -count=1 ./... (all unit packages passed; Postgres and Kind E2E self-skip without env opt-in)

Part of google#661
Fixes google#680
Pass the published ax-server image reference (needs.images.outputs.server_image)
into hack/release/build-binaries.sh during the release workflow so release builds
stamp internal/version.ServerImageDigest alongside Version via -ldflags.

axdeploy.DefaultServerImage now returns <version-tag>@<sha256:...> when
ServerImageDigest is set so EnsureDigestPinned skips the runtime tag lookup and
every install of a given release pins the exact same image. Manual builds that
only pass Version still fall back to the tag-only reference, and dev builds stay
gated even if ServerImageDigest is set.

Verification:
- go test -count=1 ./... (all unit packages pass; verifies stamped digest
  pass-through without registry lookup, tag-only fallback, and dev gate)
- go vet ./... and gofmt -l clean
- bash -n hack/release/lib.sh hack/release/build-binaries.sh
- Smoke built ./cmd/ax with both stamped and tag-only go_ldflags and checked
  ax local --help and ax install --help defaults
- Verified hack/release/build-binaries.sh rejects tag-only and malformed
  AX_SERVER_IMAGE values

Part of google#661
Fail the Build ax CLI step in .github/workflows/release.yml if
needs.images.outputs.server_image arrives empty, preventing a release
build from silently falling back to a mutable tag-only server image
default. Manual local runs of hack/release/build-binaries.sh keep the
tag-only fallback when AX_SERVER_IMAGE is unset.

Verification:
- Verified .github/workflows/release.yml parses cleanly via python3 yaml.safe_load
- Checked shell guard syntax via bash -n
- Will be exercised end-to-end by the Release workflow dry run on this PR

Part of google#661
@mayawang
mayawang force-pushed the fix/release-defaults-661 branch from 348c784 to ca23b15 Compare November 23, 2026 22:45
@mayawang

Copy link
Copy Markdown
Collaborator Author

Good catch, added an empty check in release.yml in ca23b15 so Build ax CLI fails if needs.images.outputs.server_image is missing. Manual runs of build-binaries.sh keep the tag-only fallback.

@mayawang
mayawang merged commit 765e343 into google:main Nov 23, 2026
13 checks passed
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.

README: use the prebuilt release images instead of building your own

3 participants