Repository navigation
ops(deploy): placeholder account values in wrangler.jsonc; flagship deploy applies its overlay - #201
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
wrangler.jsonccarries 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 anoperator overlaycomment, and the header points at the overlay pattern.deployjob writes its operator overlay overwrangler.jsoncfrom a repository secret (base64, one line so log masking covers all of it) before migrations and deploy. This is the same single-file overwriteactions/deploy-dispatcher-actionperforms. A missing secret fails the job instead of deploying placeholders.RUNS_METADATA), which matches the action's default and means the overlay's database name is never restated in the workflow.wrangler.*.local.jsoncpattern: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 typecheckandcron-parity.test.tspass.wrangler deploy --dry-run --containers-rollout nonepasses on both the placeholder file and an overlay.wrangler.jsonc, so the next main deploy ships the same config.cijob's dry run keeps validating the committed placeholder file. It runs on push to main, not on this PR.