Commit 97a3a1b
committed
fix(cloud): strip DO migrations from preview deploy config so PR builds stop failing
Preview (non-main) Workers Builds deploy via 'wrangler versions upload', which
rejects any config containing Durable Object migrations (error 10211). Previews
share production's already-applied DO state, so they neither need nor can apply
migrations. build.mjs strips 'migrations' from the generated dist/server/wrangler.json
on non-main CI branches; main keeps them and applies on the real deploy. Fail-safe:
only strips on a confirmed non-main CI branch, never on a production deploy.
Leaves the orphaned KV McpSessionDO + its stub export in place (harmless, unbound);
not worth a delete migration whose own preview build can't pass.1 parent 8109db1 commit 97a3a1b
1 file changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
0 commit comments