Skip to content

ci: run tests, publish arm64, and gate on deployment - #1

Merged
flaccid merged 2 commits into
mainfrom
ci/deployment-gate-and-arm64
Aug 24, 2026
Merged

ci: run tests, publish arm64, and gate on deployment#1
flaccid merged 2 commits into
mainfrom
ci/deployment-gate-and-arm64

Conversation

@flaccid

@flaccid flaccid commented Aug 24, 2026

Copy link
Copy Markdown
Member

Three CI gaps, found while building the deployment test suite in
kube-workspaces/deploy.

1. The test suite never ran

CI ran go build and go vet but never go test, so the tests in this repo
have never executed in CI despite predating the workflow. Now run with
-race plus a coverage summary. Verified passing locally.

2. Images were amd64-only

Buildx was already being set up but no platforms: list was ever passed, so
every published image was amd64-only — broken on Apple Silicon and ARM runners.

The Dockerfile now pins the builder to $BUILDPLATFORM and passes TARGETARCH
through to the compiler, so the Go build runs natively and cross-compiles rather
than emulating the whole toolchain under QEMU. Verified locally: a
--platform linux/arm64 build compiles in ~30s and produces a genuine ELF
aarch64 static binary in an arm64 image.

3. Nothing verified the image actually deploys

This repo proved its image builds and nothing more. A change here that breaks the
deployment manifests — a renamed CRD field, a moved route, a changed port —
stayed invisible until somebody happened to touch the deploy repo.

After pushing an image, CI now calls the reusable deployment test in
kube-workspaces/deploy: it stands up a kind cluster, installs the CRDs and all
four components with this build pinned to the commit under test, then runs the
smoke and functional workspace-lifecycle suites. Skipped on pull_request, since
nothing is pushed there for it to pull.

The image tag comes from a build-job output rather than being reconstructed in the
caller: docker/metadata-action is configured with type=sha,prefix= so the tag
is the bare 7-character SHA (confirmed against the tags currently in GHCR), and
duplicating that formatting would eventually drift.


Note: the deployment-test job will only work once this PR is merged and an image
is pushed — it deliberately does not run on PRs.

Buildx was already being set up but no platforms list was ever passed, so every
published image was amd64-only. That breaks Apple Silicon and ARM runners, which
have to fall back to emulation or simply cannot run the image.

The Dockerfile now pins the builder to $BUILDPLATFORM and passes TARGETARCH
through to the compiler, so the Go build runs natively and cross-compiles rather
than emulating the whole toolchain under QEMU. Verified locally: a
--platform linux/arm64 build compiles in ~30s and produces a genuine
ELF aarch64 static binary in an arm64 image.
This repo proved its image builds and nothing more. A change here that breaks
the deployment manifests — a renamed CRD field, a moved route, a changed port —
stayed invisible until somebody happened to touch the deploy repo.

After pushing an image, call the reusable deployment test in
kube-workspaces/deploy: it stands up a kind cluster, installs the CRDs and all
four components with this build pinned to the commit under test, and runs the
smoke and functional suites.

Skipped on pull_request, since nothing is pushed there for the test to pull.

The image tag comes from a build-job output rather than being reconstructed in
the caller: docker/metadata-action is configured with type=sha,prefix= so the
tag is the bare 7-character SHA (confirmed against the tags currently in GHCR),
and duplicating that formatting would eventually drift.
@flaccid
flaccid merged commit 3e929aa into main Aug 24, 2026
8 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.

1 participant