Skip to content

docs: update worker-upgrades runbook for binary split + admin pinning API#512

Merged
fuziontech merged 1 commit into
mainfrom
docs/worker-upgrades-binary-split
May 5, 2026
Merged

docs: update worker-upgrades runbook for binary split + admin pinning API#512
fuziontech merged 1 commit into
mainfrom
docs/worker-upgrades-binary-split

Conversation

@fuziontech
Copy link
Copy Markdown
Member

Summary

Two pieces of docs/runbooks/worker-upgrades.md went stale during the recent binary-split work. This PR brings the runbook back in sync with what landed.

What was wrong

  1. Canary instructions used direct SQL. The runbook said "set the image field for the target org in the Config Store database" and showed a literal UPDATE duckgres_managed_warehouses SET image=.... PR feat(admin): PATCH /orgs/:id/warehouse/pinning for tenant image+ducklake #506 replaced that with a row-locked admin endpoint: PATCH /api/v1/orgs/:id/warehouse/pinning. Direct SQL bypasses the transaction lock so concurrent operator mutations can clobber each other.
  2. Image format was the legacy all-in-one. Examples used posthog/duckgres:vX.Y.Z — but PRs feat(cmd/duckgres-worker): add a worker-only entry point that ships libduckdb #500-feat: add Dockerfile.controlplane for the duckdb-free CP image #503 split that into a per-DuckDB-version duckgres-worker matrix CD producing ghcr.io/posthog/duckgres-worker:<sha>-duckdb<version> (and the ECR mirror provisioned in posthog-cloud-infra#7848).

Changes

  • Every "canary a build" example now uses the PATCH /api/v1/orgs/:id/warehouse/pinning endpoint with curl + bearer-token shape, and an explicit "do not run direct UPDATE SQL" note.
  • New Available Worker Builds section: tag conventions table (GHCR + ECR), gh api and aws ecr list-images snippets to enumerate what's currently in the registry, and an explanation of why pinning a non-default DuckDB version requires a specific <sha>-duckdb<version> tag (there's no latest-duckdb<version> convention).
  • New Reverting a Pin section: documents the empty-string semantics for clearing fields back to the global default, with a caution that clearing ducklake_version does NOT downgrade an already-migrated tenant (one-way door — already noted elsewhere in the doc).
  • Fixes ducklake_version format in examples to major.minor only ("0.4", "1.0", "1.1") matching the validator added in feat(admin): PATCH /orgs/:id/warehouse/pinning for tenant image+ducklake #506.
  • New Background section briefly linking the two-image story back to the binary-split PRs for future maintainers.

Test plan

Doc-only — no code changes. CI lint should pass; no test impact.

🤖 Generated with Claude Code

… API

Two pieces of the runbook went stale during the recent binary-split work:

1. The "canary a new build" instructions still recommended direct
   `UPDATE duckgres_managed_warehouses SET image=...` SQL against the
   config store. PR #506 replaced that with `PATCH
   /api/v1/orgs/:id/warehouse/pinning` (row-locked transaction, audit
   trail, no DB shell required). Updates every example to use the API
   endpoint and explicitly tells operators not to use SQL.

2. The image format was the all-in-one `posthog/duckgres:vX.Y.Z`. PRs
   #500-#503 split that into a per-DuckDB-version `duckgres-worker`
   matrix. Updates examples to the new
   `ghcr.io/posthog/duckgres-worker:<sha>-duckdb<version>` shape and
   adds a tag-conventions table covering both GHCR and the ECR mirror
   (provisioned in posthog-cloud-infra#7848).

Adds two new sections:

- "Available Worker Builds" — explains the matrix CD, shows operators
  how to list current ECR / GHCR tags, and explains why pinning a
  non-default DuckDB version requires a specific `<sha>-duckdb<version>`
  tag (no `latest-duckdb<version>` convention exists).
- "Reverting a Pin" — documents the empty-string semantics for clearing
  back to the global default, with a caution that clearing
  `ducklake_version` does NOT downgrade an already-migrated tenant
  (one-way door from the existing CAUTION block).

Also fixes the spec-version format in examples (it's `major.minor` only —
"0.4" / "1.0" / "1.1" — matching the validator added in #506) and adds
a "Background" section linking back to the binary-split PRs so future
maintainers understand the two-image story.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@fuziontech fuziontech merged commit 3b9ed94 into main May 5, 2026
22 checks passed
@fuziontech fuziontech deleted the docs/worker-upgrades-binary-split branch May 5, 2026 00:13
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