fix(cloud): unbreak main deploy — create SQLite DO without same-deploy delete#1193
Merged
Conversation
…me deploy The delete migration kept failing (code 10061): Cloudflare validates a class delete against the LIVE binding, which still pointed at McpSessionDO, so binding move + delete can't happen in one deploy. Drop the delete: v2 only creates the new SQLite class McpSessionDOSqlite and the MCP_SESSION binding moves to it. The old KV McpSessionDO is left orphaned (kept as a stub export so the migration stays valid) and can be deleted in a later deploy now that nothing binds it. Also repoint the generated MCP_SESSION binding type to McpSessionDOSqlite.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
executor-cloud | fb561c3 | Jun 28 2026, 10:28 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | fb561c3 | Commit Preview URL Branch Preview URL |
Jun 28 2026, 10:27 PM |
Contributor
Cloudflare previewTorn down — the PR is closed. |
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.
Incident state
maincurrently fails to deploy (#1191): Cloudflare rejects thedeleted_classes: ["McpSessionDO"]migration with code 10061 — it validates the delete against the live binding, which still points atMcpSessionDO. So moving the binding and deleting the class can't happen in one deploy. Prod is on the rolled-back (working KV) version meanwhile.Fix
Stop deleting in this deploy.
v2now only creates the new SQLite class and the binding moves to it:v2:new_sqlite_classes: ["McpSessionDOSqlite"](nodeleted_classes)MCP_SESSIONbinding →McpSessionDOSqliteMcpSessionDOleft orphaned + unbound, kept as a stub export inserver.tsso the migration stays validMCP_SESSIONbinding type →McpSessionDOSqliteNo delete → no 10061. Session state is ephemeral, nothing lost.
Verified locally
McpSessionDOSqlite(real, bound) andMcpSessionDO(stub) — both present, which is what the migration needsExpectations
10211(versioned uploads can't apply DO migrations) — inherent, ignore.maindeploy is non-versioned and applies the migration. This timev2has no delete, so the 10061 can't recur.Follow-up
Once this is live, a trivial later deploy can add
deleted_classes: ["McpSessionDO"]+ drop the stub (the binding is already off it).