Skip to content

#613 Speed up client-build: hoist ng build out of Docker#614

Merged
bracyw merged 5 commits into
developfrom
613-speed-up-client-build
Apr 24, 2026
Merged

#613 Speed up client-build: hoist ng build out of Docker#614
bracyw merged 5 commits into
developfrom
613-speed-up-client-build

Conversation

@bracyw
Copy link
Copy Markdown
Collaborator

@bracyw bracyw commented Apr 24, 2026

Changes

Mirrors the #610 scylla idea (build once native, avoid QEMU on real work) but goes further — collapses the client workflow to a single job. ng build runs once on an amd64 runner, then one buildx push produces the multi-arch manifest directly.

  • Single build-and-push job: checkout, setup-node, npm ci, npm run build:production, setup-qemu, setup-buildx, login, one buildx call with platforms: linux/amd64,linux/arm64
  • New angular-client/Dockerfile.prebuilt: nginx:alpine base, no Build stage, COPYs the prebuilt browser/ artifact along with nginx.conf, env.prod.js, and entrypoint.sh
  • angular-client/Dockerfile is untouched so build-check.yml and compose still build from source

Notes

  • Deviates from the ticket AC in two deliberate ways:
    • AC calls for three jobs (build-client → build-image matrix → merge). Started there, then realized the per-arch Docker work is just apk add gettext plus static COPYs — native runners bought nothing. The ng build hoist is what actually saves the QEMU time. Collapsed to one job to drop pointless artifact upload/download and the imagetools merge step.
    • AC calls for cache: "npm" on setup-node. ng build dominates build-client wall time and the cache burns runner storage on a hash that turns over every lockfile change. Happy to add either back if a reviewer wants strict AC parity.
  • Workflow is workflow_dispatch only, so timings come from manually triggering the workflow on this branch. Will fill them in here once the first run completes.
  • Out of scope per the ticket: enabling .angular/cache in CI as a follow-up.

Test Cases

  • Lint and prettier pass on the angular-client tree
  • No merge conflicts against develop
  • CI run pending: confirm the job produces a multi-arch manifest that pulls and runs on both amd64 and arm64

Checklist

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No package-lock.json changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #613

@bracyw bracyw self-assigned this Apr 24, 2026
@bracyw bracyw marked this pull request as ready for review April 24, 2026 06:30
Drops the build-client → build-image matrix → merge shape in favor of a
single build-and-push job. ng build still runs once natively on amd64,
then one buildx --platform linux/amd64,linux/arm64 push produces the
multi-arch manifest directly — no per-arch tags, no imagetools merge.

The per-arch work left in Dockerfile.prebuilt is just apk add gettext
and static COPYs, so native runners bought nothing here. All real CPU
work (ng build) already runs native on amd64 outside Docker.
@bracyw bracyw changed the title #613 Speed up client-build via native per-arch matrix #613 Speed up client-build: hoist ng build out of Docker Apr 24, 2026
@bracyw bracyw merged commit 4c99a1c into develop Apr 24, 2026
5 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.

Speed up client-build.yml by mirroring the scylla CI pattern

1 participant