Repository navigation
Conversation
Remove ko from the build and deploy flow. The new `make images` target cross-compiles ax-server and ax-task-runner for linux/$IMAGE_ARCH, builds their container images with podman (falling back to docker), and pushes them to $AX_IMAGE_REPO. AX_IMAGE_REPO is required, and IMAGE_TAG overrides the default `latest` tag. `make deploy-server` now fills in the ax-server image in deploy/ax-server.yaml. It also sets AX_DEFAULT_TASK_IMAGE, so the server runs the task-runner image you pushed for tasks that do not set spec.image. Since the default tag is `latest`, imagePullPolicy is now Always. Other changes: - Delete .ko.yaml. - Move Dockerfile.server from test/e2e/ to the repo root so the e2e setup and `make images` share it. - Remove redundant Makefile targets (all, build-binaries, build-task-runner, push-task-runner, push). - Update README, CONTRIBUTING, and docs to use `make images`.
mayawang
left a comment
There was a problem hiding this comment.
Thanks @rakyll, dropping ko is a big step for onboarding. One issue: deploy-server sets AX_DEFAULT_TASK_IMAGE to the :latest tag, and Substrate rejects images that aren't pinned by digest, so any task without spec.image fails at template creation. Could images resolve the pushed digest and deploy-server use image@sha256:... instead? The old push-task-runner printed it. Also heads-up: this conflicts with #505 in README.md, and #500's install guide is built around ko, so it'll need updating after this lands. I'd suggest landing #505 first.
mayawang
left a comment
There was a problem hiding this comment.
Approving so this can land. One gap worth fixing right away, since it's exactly the deploy path: the README goes make images then make deploy, but make deploy never reads bin/ax-task-runner.digest, so AX_DEFAULT_TASK_IMAGE ends up as the :latest tag and Substrate rejects tasks that don't set spec.image. Defaulting it from the digest file when it exists would make the two-step README work as written:
AX_DEFAULT_TASK_IMAGE ?= $(if $(wildcard bin/ax-task-runner.digest),$(AX_IMAGE_REPO)/ax-task-runner@$(shell cat bin/ax-task-runner.digest),$(AX_TASK_RUNNER_IMAGE))|
I put the digest fix in a separate PR so this one can merge as is: #529 |
|
Okay merged. #529 can be merged now. |
Moving to Substrate v1.0 (#49) moves ax and ax-runner to the fork's port (12dbe16), and ax-server, the agent image and the e2e-runner must roll together with it. They are built on main from what versions.yaml pins, so the pin bump could only pin their digests in a follow-up. images.yml takes an `ax-commit` input (by hand, on main) that builds ax-server and the e2e-runner for that fork commit; the e2e-runner is tagged <shipmind commit>-ax-<12 characters>. image-agent-mast.yml takes `ax-runner-commit` the same way, tagged <shipmind commit>-runner-<12>. The build-args scripts take the overrides and refuse anything but a full SHA. ax-server builds with the fork's Dockerfile.server when it has one, as upstream's `make images` does: upstream dropped ko (google/ax#508), and the v1 port carries no .ko.yaml. Earlier pins keep building with ko. Verified: both build-args scripts print the override or the pin and refuse a short SHA; dev/tools/ci green. The workflows run for real when dispatched after merge. Signed-off-by: Gari Singh <[email protected]>
Remove ko from the build and deploy flow. The new
make imagestarget cross-compiles ax-server and ax-task-runner for linux/$IMAGE_ARCH, builds their container images with podman (falling back to docker), and pushes them to $AX_IMAGE_REPO. AX_IMAGE_REPO is required, and IMAGE_TAG overrides the defaultlatesttag.make deploy-servernow fills in the ax-server image in deploy/ax-server.yaml. It also sets AX_DEFAULT_TASK_IMAGE, so the server runs the task-runner image you pushed for tasks that do not set spec.image. Since the default tag islatest, imagePullPolicy is now Always.Other changes:
make imagesshare it.make images.