Skip to content

build: replace ko with make images using podman or docker - #508

Merged
rakyll merged 2 commits into
mainfrom
ko
Oct 28, 2026
Merged

rakyll merged 2 commits into
mainfrom
ko

Conversation

@rakyll

@rakyll rakyll commented Oct 22, 2026

Copy link
Copy Markdown
Member

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.

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`.
@rakyll
rakyll requested a review from mayawang October 22, 2026 18:36

@mayawang mayawang 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.

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.

@rakyll

rakyll commented Oct 22, 2026

Copy link
Copy Markdown
Member Author

This can wait, let's focus on #500 and #505.

@mayawang mayawang 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.

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))

@mayawang

Copy link
Copy Markdown
Collaborator

I put the digest fix in a separate PR so this one can merge as is: #529

@rakyll
rakyll merged commit efd00c4 into main Oct 28, 2026
10 checks passed
@rakyll
rakyll deleted the ko branch October 28, 2026 03:53
@rakyll

rakyll commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Okay merged. #529 can be merged now.

mastersingh24 added a commit to go-steer/shipmind that referenced this pull request Oct 31, 2026
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]>
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.

2 participants