mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-11-20 13:07:57 +09:00
## Summary GCP cost cuts in CI (approved): 1. **GitHub-hosted runners for test/package jobs** (~\$28/mo of `gha-general-*` VMs, ~390 VMs/30d). Moved to `ubuntu-latest` (free, public repo): `package-unit-tests`, `package-integration-tests`, `package-build-test`, `backend-unit-tests`, `backend-emulator-tests`, `package-build` (main), `frontend-e2e-full` (label-gated). None used GCP auth. Self-hosted disk checks replaced by a free-disk-space step (drop dotnet/android/ghc/CodeQL); venv cache keys renamed so self-hosted venvs aren't restored onto a different interpreter path. 2. **Removed `propagate-base-image`** — pre-pulled the base image onto "the 3 runners"; runners are now single-use ephemeral VMs so this just spawned 3 VMs per base rebuild for nothing. 3. **AR inter-region egress** (~\$12-16/mo): the GPU app image was built on a us-central1 runner `FROM` the ~13 GB GPU base in **us-east4**, pulling it cross-region on every deploy. The GPU base + all BuildKit caches now live in us-central1 `karaoke-repo`; only the final app image is pushed to us-east4 (`karaoke-backend-gpu`) where `audio-separation-job` pulls it same-region. Push uploads only the small changed app layers (base layer digests are identical). First deploy copies the current base from us-east4 via `buildx imagetools create` (byte-identical, no from-scratch rebuild); falls back to a rebuild only if that fails. 4. `build-runner-images.yml`: `KEEP_IMAGES_PER_FAMILY` 2 → 1 (GPU/windows images are 15-21 GiB). 5. `ci.yml` changes now trigger the package/backend test jobs (so this PR exercises the moved jobs). `deploy-backend` stays on the `docker-build` GCE runner (Docker builds, WIF, same-region AR). GPU runners untouched. ## Testing - This PR's CI runs the moved jobs on hosted runners. - `image_hash` helper + `imagetools create` cross-registry copy verified locally against two `registry:2` instances (copy wraps in a single-entry index; helper follows it). - actionlint: no new findings (fewer than before). 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * CI test, package, and frontend end-to-end jobs now run on GitHub-hosted runners. GPU image builds use a centralized base-image cache, while application images continue to be published in their existing region. * Runner image cleanup retains the newest image per family; images backing existing disks remain protected. * **Documentation** * Updated the runner guide to describe which jobs use hosted or self-hosted runners and how image retention works. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>