fix(infra): drop applied Api Durable Object migration by thdxr · Pull Request #57637 · anomalyco/opencode · GitHub
Skip to content

fix(infra): drop applied Api Durable Object migration - #57637

Open
thdxr wants to merge 1 commit into
devfrom
fix-api-migrations
Open

thdxr wants to merge 1 commit into
devfrom
fix-api-migrations

Conversation

@thdxr

@thdxr thdxr commented Oct 21, 2026

Copy link
Copy Markdown
Member

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

#57548 added a one-time Durable Object migration to the Api worker (undefined/v1 → v2, delete SyncServer). That migration was applied on the last dev and production deploys, so both scripts are already at tag v2. Every upload of the Api worker now fails with a 412:

Actor migration tag precondition failed, got tag '' when expected tag is 'v2'   (production)
Actor migration tag precondition failed, got tag 'v1' when expected tag is 'v2' (dev)

The first change to packages/function/src/api.ts since then was #57630, so that's when it showed up. Failed runs:

Until this is fixed, every dev deploy will fail because the Api worker has a pending update.

This removes the migration that's already applied. With no migrations sent, Cloudflare keeps the script at v2. That's how wrangler behaves when there are no pending migrations. The worker has no Durable Object bindings, so nothing else needs a migration. Personal stages that never deployed #57548 would still need it once. Those stages are dev-only.

How did you verify your code works?

  • Confirmed from the deploy logs that both scripts are already at v2
  • Lint passes

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I couldn't check it with a real deploy (the 412 only shows up on a Cloudflare upload and there are no credentials here), so I reviewed the diff against #57548. It removes exactly the migration block that change added. The Api worker no longer has a SyncServer binding or class anywhere, so it needs no migration, and an upload with no migrations leaves the existing v2 tag alone. The public API is unchanged (infra config only). The only leftover is the one you mention: a personal stage that never deployed #57548 will keep its SyncServer class until it gets that migration once. That's dev-only and doesn't block the merge.

This branch has not been deployed

No deployments
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