From 5f08ed2511dd6196fc171f58130a1150071b02ec Mon Sep 17 00:00:00 2001 From: Wes Date: Thu, 19 Nov 2026 10:09:04 -0700 Subject: [PATCH] fix(deploy): pin self-host installs to relay 0.3.0 (#9714) ## Summary - Pin the Compose fallback and example environment to `ghcr.io/block/buzz:0.3.0`. Document how to opt into rolling `:main` builds and how to update the image tag before running `./run.sh upgrade`. - Set the Helm chart's default relay image to `0.3.0` through `appVersion` and bump the chart and quickstart to `0.1.12`. - Add a relay release checklist step to update both deployment defaults after each stable image is available. The existing chart release workflow publishes the bumped chart after merge. ### Related work [#2824](https://github.com/block/buzz/pull/2824) also touches self-host Compose. This PR covers release tags and upgrade instructions. ### Testing - Rendered Compose with the example environment, the fallback, and explicit image overrides. A fresh isolated Compose install reached readiness with `ghcr.io/block/buzz:0.3.0` and returned `ok` from `/_liveness`. - Passed Helm lint and all 85 unit tests. Rendered all four chart fixtures, verified the default image and an override, and packaged chart `0.1.12` with app version `0.3.0`. - The repository-wide `just ci` run passed. It started at `cf357b241`, and the final commit changes only the Compose upgrade text. --------- Signed-off-by: Star Lord Co-authored-by: Star Lord --- RELEASING.md | 8 ++++++++ deploy/charts/buzz/Chart.yaml | 6 +++--- deploy/charts/buzz/README.md | 12 ++++++------ .../charts/buzz/tests/storage_accounting_test.yaml | 6 ++++-- deploy/compose/.env.example | 4 ++-- deploy/compose/README.md | 9 ++++++++- deploy/compose/compose.yml | 2 +- deploy/compose/run.sh | 2 +- 8 files changed, 33 insertions(+), 16 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index bf3262d5d8..306650dd4a 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -103,6 +103,14 @@ prior release's recorded squash commit; tag ancestry is deliberately irrelevant. optimized, symbol-bearing image under matching `debug-` tags (for example, `debug-0.3.0` and `debug-latest`) for native profiling. The ordinary tags remain stripped and are the default for deployments that do not need it. +4. **Update self-host defaults after each stable relay release.** Once + `ghcr.io/block/buzz:` is available, set the exact tag in + `deploy/compose/compose.yml`, `deploy/compose/.env.example`, and the + Compose README. Set `appVersion` in `deploy/charts/buzz/Chart.yaml` to + the same relay version, bump the chart version, and update the chart + README's quickstart pin. Merge these changes in one PR so the + [chart release workflow](deploy/charts/buzz/README.md#releasing) publishes + the updated chart. Every push to `main` that changes the image build context continues to publish the rolling relay `:main` and `:sha-<7>` tags, plus matching diff --git a/deploy/charts/buzz/Chart.yaml b/deploy/charts/buzz/Chart.yaml index ac3d871bc2..a3c0f98dd7 100644 --- a/deploy/charts/buzz/Chart.yaml +++ b/deploy/charts/buzz/Chart.yaml @@ -7,8 +7,8 @@ description: | PostgreSQL and Redis. Configurable for single-node evaluation (subcharts on) and HA production (external services, existingSecret). type: application -version: 0.1.11 -appVersion: "0.1.0" +version: 0.1.12 +appVersion: "0.3.0" home: https://github.com/block/buzz sources: - https://github.com/block/buzz @@ -24,7 +24,7 @@ maintainers: annotations: artifacthub.io/changes: | - kind: changed - description: Chart-managed Pods derive tags.datadoghq.com/version from the deployed image identity instead of operator-supplied labels. + description: Default the relay image to release 0.3.0. artifacthub.io/license: Apache-2.0 # Optional eval-only subcharts. Production deploys disable both and point diff --git a/deploy/charts/buzz/README.md b/deploy/charts/buzz/README.md index cc165e2480..1f0be36dd4 100644 --- a/deploy/charts/buzz/README.md +++ b/deploy/charts/buzz/README.md @@ -12,7 +12,7 @@ This chart has two operating profiles selected by values: ## Quickstart (eval only) ```sh -helm install buzz oci://ghcr.io/block/buzz/charts/buzz --version 0.1.10 \ +helm install buzz oci://ghcr.io/block/buzz/charts/buzz --version 0.1.12 \ --create-namespace --namespace buzz \ --set quickstart=true \ --set postgresql.enabled=true \ @@ -675,11 +675,11 @@ and the relay image via its own `chart-v*` tags. Every PR/`main` push still lints, unit-tests, and render-checks the chart; only a `chart-v*` tag publishes, so an in-progress `main` can never overwrite a released version. -To cut a release, push a `chart-release/` branch whose `` -matches `Chart.yaml`'s `version`; merging it auto-tags `chart-v` and -dispatches the publish job (same lane machinery as the desktop and relay -releases — see `.github/workflows/auto-tag-on-release-pr-merge.yml`). The publish -job fails loudly if the tag version and `Chart.yaml` version disagree. +Merging a PR from a branch in `block/buzz` that bumps `version` in +`Chart.yaml` creates a `chart-v` tag and triggers the publish job. +For a dedicated release PR, use a `chart-release/` branch with a +version matching `Chart.yaml`. The publish job checks that the tag and +`Chart.yaml` version agree. ## Development diff --git a/deploy/charts/buzz/tests/storage_accounting_test.yaml b/deploy/charts/buzz/tests/storage_accounting_test.yaml index bd3ffdc95a..0a691582c5 100644 --- a/deploy/charts/buzz/tests/storage_accounting_test.yaml +++ b/deploy/charts/buzz/tests/storage_accounting_test.yaml @@ -24,6 +24,8 @@ tests: value: external template: templates/deployment.yaml - it: renders a non-overlapping worker with an isolated cap + chart: + appVersion: "1.2.3" set: relayUrl: wss://buzz.example.com ownerPubkey: "0000000000000000000000000000000000000000000000000000000000000000" @@ -98,7 +100,7 @@ tests: # falls back to Chart.AppVersion, the same value as the env var below. - equal: path: spec.jobTemplate.spec.template.metadata.labels["tags.datadoghq.com/version"] - value: 0.1.0 + value: "1.2.3" template: templates/storage-accounting-cronjob.yaml - equal: path: spec.jobTemplate.spec.template.spec.containers[0].args @@ -116,7 +118,7 @@ tests: path: spec.jobTemplate.spec.template.spec.containers[0].env content: name: BUZZ_STORAGE_SNAPSHOT_CODE_SHA - value: 0.1.0 + value: "1.2.3" template: templates/storage-accounting-cronjob.yaml - contains: path: spec.jobTemplate.spec.template.spec.containers[0].env diff --git a/deploy/compose/.env.example b/deploy/compose/.env.example index 624b5c818e..5e24134b1a 100644 --- a/deploy/compose/.env.example +++ b/deploy/compose/.env.example @@ -2,8 +2,8 @@ # Copy to .env and replace every CHANGE_ME value before running. # The bootstrap script should generate this file for normal users. -# Image published by the public image pipeline. Use `:main` for pre-release testing. Pin `:sha-<7>` or a semver release tag for production. -BUZZ_IMAGE=ghcr.io/block/buzz:main +# Pin an exact relay release. Use ghcr.io/block/buzz:main to test rolling builds. +BUZZ_IMAGE=ghcr.io/block/buzz:0.3.0 # Public host name. Used by compose.caddy.yml and URL-derived settings below. BUZZ_DOMAIN=buzz.example.com diff --git a/deploy/compose/README.md b/deploy/compose/README.md index 0e4d2ff118..efa0d97f7f 100644 --- a/deploy/compose/README.md +++ b/deploy/compose/README.md @@ -23,11 +23,18 @@ The bootstrap script should eventually replace manual `.env` editing for normal users. It is responsible for generating stable secrets and, optionally, an owner keypair. +## Upgrade + +Compose defaults to the exact relay release `ghcr.io/block/buzz:0.3.0`. +A `BUZZ_IMAGE` already set in `.env` takes precedence over that default. +To upgrade to a newer release, set `BUZZ_IMAGE` in `.env` to its exact relay +image tag, then run `./run.sh upgrade`. For rolling test builds, set +`BUZZ_IMAGE=ghcr.io/block/buzz:main`. + ## Production notes - Requires Docker Compose v2.24.4 or newer; the TLS override uses Compose's `!reset` tag to remove the direct relay port when Caddy terminates HTTPS. -- Default `BUZZ_IMAGE` tracks `ghcr.io/block/buzz:main` for early testing. Pin it to `ghcr.io/block/buzz:sha-<7>` or a semver release tag for production once available. - Keep `BUZZ_RELAY_PRIVATE_KEY`, `BUZZ_GIT_HOOK_HMAC_SECRET`, database/Redis, and S3 secrets stable across restarts. - `RELAY_OWNER_PUBKEY` is intentionally not prefixed with `BUZZ_`; it must be a diff --git a/deploy/compose/compose.yml b/deploy/compose/compose.yml index effe78e058..08fe5a9665 100644 --- a/deploy/compose/compose.yml +++ b/deploy/compose/compose.yml @@ -2,7 +2,7 @@ name: buzz-prod services: relay: - image: ${BUZZ_IMAGE:-ghcr.io/block/buzz:main} + image: ${BUZZ_IMAGE:-ghcr.io/block/buzz:0.3.0} env_file: - .env environment: diff --git a/deploy/compose/run.sh b/deploy/compose/run.sh index d5465ea1f5..a62da3b92c 100755 --- a/deploy/compose/run.sh +++ b/deploy/compose/run.sh @@ -104,7 +104,7 @@ Commands: stop Stop containers without deleting volumes restart Recreate the relay after env/image changes pull Pull configured images - upgrade Pull and restart, then print backup reminders + upgrade After changing the BUZZ_IMAGE tag in .env, pull and restart logs [svc] Follow logs (default: relay) status Show compose service status config Render merged compose config