Skip to content

ops(deploy): placeholder account values in wrangler.jsonc; flagship deploy applies its overlay - #201

Merged
debuggingfuture merged 1 commit into
mainfrom
ops/wrangler-overlay
Oct 17, 2026
Merged

debuggingfuture merged 1 commit into
mainfrom
ops/wrangler-overlay

Conversation

@debuggingfuture

Copy link
Copy Markdown
Member

What

  • Root wrangler.jsonc carries placeholders for every account-specific value: the custom-domain hostname, the account id, AI Gateway id, Access team domain and deploy-console AUD, the R2 bucket name, the D1 database name and id, and both KV namespace ids. Each sits beside an operator overlay comment, and the header points at the overlay pattern.
  • The flagship deploy job writes its operator overlay over wrangler.jsonc from a repository secret (base64, one line so log masking covers all of it) before migrations and deploy. This is the same single-file overwrite actions/deploy-dispatcher-action performs. A missing secret fails the job instead of deploying placeholders.
  • The dispatcher's D1 migration addresses the database by binding (RUNS_METADATA), which matches the action's default and means the overlay's database name is never restated in the workflow.
  • Locally, the overlay lives in the already-ignored wrangler.*.local.jsonc pattern: pnpm exec wrangler deploy -c wrangler.overlay.local.jsonc.

Why

The repo is the artifact every org deploys into its own account. One org's ids are noise to every other reader and should not be published.

Verification

  • pnpm lint, pnpm typecheck and cron-parity.test.ts pass.
  • wrangler deploy --dry-run --containers-rollout none passes on both the placeholder file and an overlay.
  • The decoded overlay is byte-identical to the previous wrangler.jsonc, so the next main deploy ships the same config.
  • The ci job's dry run keeps validating the committed placeholder file. It runs on push to main, not on this PR.

…eploy applies its overlay

The committed wrangler.jsonc carries placeholders for every account-specific
value. The flagship deploy job writes its operator overlay over the file from a
repository secret before migrations and deploy, the same single-file overwrite
the deploy-dispatcher action performs. The dispatcher migration addresses its
database by binding.
@debuggingfuture
debuggingfuture merged commit 5246d9b into main Oct 17, 2026
2 of 6 checks passed
@debuggingfuture
debuggingfuture deleted the ops/wrangler-overlay branch October 17, 2026 03:32
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