fix(worker): real D1/KV IDs, correct migrations_dir, real origins - #1024
Merged
Conversation
PR #1019 wired migrations_dir as `../packages/schema/migrations`, which resolves relative to apps/worker/ to the nonexistent apps/packages path — `wrangler d1 migrations apply` could never find the 12 migrations. The placeholder database_id/KV id also blocked migration application, and APP_BASE_URL/WebAuthn still pointed at example.com/localhost. Replace placeholders with the provisioned resources (D1 do-epub-studio, KV CACHE_KV), correct migrations_dir to ../../packages/schema/migrations, and set real Pages origins so no deploy path bakes in placeholder domains. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Deploying do-epub-studio with
|
| Latest commit: |
443b7ae
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://267a2eb6.do-epub-studio.pages.dev |
| Branch Preview URL: | https://fix-wrangler-real-resource-i.do-epub-studio.pages.dev |
Contributor
Up to standards ✅🟢 Issues
|
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 & why
../packages/schema/migrationsresolves relative toapps/worker/→ nonexistentapps/packages/....wrangler d1 migrations applycould never find the 12 migrations; the--dry-runin fix(worker): wire D1 migrations_dir + correct deploy runbook (GOAP-252) #1019 didn't catch it.database_idwasplaceholder-replace-with-real-id).example.com/localhost) would break CORS/recovery/passkeys if the worker-deploy path were used.Changes
migrations_dir→../../packages/schema/migrations(resolves to repo root correctly)database_id→ real D1do-epub-studio(dd47f3de-…)CACHE_KVid →5328daf8…APP_BASE_URL/WEBAUTHN_*→https://do-epub-studio.pages.devVerified
wrangler d1 migrations applynow resolves the migrations dir; all 12 already applied to remote.pnpm check:deploy-configpasses.Note: this PR also triggers a fresh Cloudflare Pages production build via the Git integration, which picks up the dashboard-configured D1/KV bindings (the retry mechanism reuses stale config, so a fresh build is required for the bindings to attach).