Repository navigation
install: default server image on releases, pin Studio, and simplify quickstart - #678
Conversation
8b6ae6a to
d6ecb1a
Compare
| // 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") |
There was a problem hiding this comment.
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.
d6ecb1a to
348c784
Compare
MushuEE
left a comment
There was a problem hiding this comment.
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
348c784 to
ca23b15
Compare
|
Good catch, added an empty check in |
Summary
Prepares zero-flag release
ax-serverinstalls, Studio bundling, and simplified quickstart docs onmain(ready to backport ontorelease-0.4forv0.4.0-rc.2):ax-serverdefault (Zero-flag ax local / Studio UX when DefaultServerImage and DefaultRunnerVolumeImage are unset #661): Replace emptyDefaultServerImagewithaxdeploy.DefaultServerImage(), returningversion.Image("ax-server")whenversion.IsRelease()is true soEnsureDigestPinnedpins the multi-arch@sha256digest at install time. Unversioned dev builds still require--server-imageor$AX_SERVER_IMAGE, andimageFlags.registerleaves flag defaults empty so$AX_SERVER_IMAGEcontinues to take precedence over release defaults.DefaultRunnerVolumeImagestays empty pending Zero-flag ax local / Studio UX when DefaultServerImage and DefaultRunnerVolumeImage are unset #661 / Release the runner volume image (ax-runner-volume) #625.install.sh: SetPINNED_STUDIO_VERSION="v0.4.0-rc.1"with verified SHA-256 digests fromagentexecutor/studio v0.4.0-rc.1checksums.txt for all four release platforms, update the printed next step toax local start, and updateTestInstallShStudioPinning.README.md: SimplifyREADME.mdquick start toinstall.sh(now installing bothaxandax-studio) +ax local start/ax install, document that prebuilt agent images with no runner baked in (such as Antigravity) need--runner-volume-imagefrom the release notes inREADME.mdanddocs/local_installer.md, movemake imagesinstructions and thelocalhostregistry link from install: serve localhost registry images to the local cluster #666 todocs/development.md#build-and-push-images(keepingUsing Locally Built Imagesindocs/local_installer.md), and updatedocs/releasing.md.Part of #661.
Fixes #680.
Verification
cc @MushuEE for release-defaults review.