fix(web): retire provider rows as destroyed in the Blaxel and E2B/Daytona migrations - #11623
Merged
Merged
Conversation
…tona migrations Both enum-removal migrations relabeled rows on a retired provider without touching status, so a running Blaxel machine came back as a running e2b machine and a running e2b or Daytona machine comes back as a running Freestyle machine that the Freestyle driver cannot find. Both migrations now mark every non-destroyed row on a retired provider destroyed first, the way markDestroyed does it at runtime, with failure_code 'provider_retired' and a provider-specific failure_message, then relabel for the enum rebuild. Reads hide destroyed rows and a base whose active machine is destroyed opens a fresh generation on the default provider. The Blaxel file is the content of f75673f, which was reverted from PR 11587 so the read-path fix could ship during the incident. Its dry run against production inside a rolled-back transaction retired 8 rows and relabeled 17. Provider comparisons are cast to text in both files. On a fresh database every migration runs in one transaction and Postgres rejects an enum literal for a label added by an earlier ALTER TYPE ... ADD VALUE ("unsafe use of new value"). 'daytona' is such a label; today it only resolves because the Blaxel rebuild re-creates the type first. This assumes both migrations are still unapplied in staging and production. drizzle skips any migration whose folder name is already in drizzle.__drizzle_migrations, so an edit to an applied migration would be silently ignored. Verify that table before applying. Verified: drizzle-kit check passes; cloud-vm:preflight applied the full migration set twice to a fresh Docker Postgres and db-schema.test.ts passed; tsgo --noEmit passes; vm-retired-provider-rows.test.ts passes. Claude-Session: https://claude.ai/code/session_01AvkeWizggvvUAngHyB7JUQ
|
Warning Review limit reachedNext included review available in 1 minute. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
rustybret
pushed a commit
to rustybret/bmux
that referenced
this pull request
Sep 2, 2026
c8ec44d Cloud VPC follow-ups: copyable machine IPs, working tree menu, no HTTP modal on private addresses (manaflow-ai#11626) cbda3b0 ci: land base-controlled CLA policy guard (manaflow-ai#11606) 40d1dc6 CLI: return notification ids and support scoped clear (manaflow-ai#10336) d86d5f3 fix(relay): offload bounded filesystem actions (manaflow-ai#11568) 9778ac7 Plus menu: one New Cloud VM item that opens the New Machine sheet (manaflow-ai#11603) 392f83d fix(web): retire provider rows as destroyed in the Blaxel and E2B/Daytona migrations (manaflow-ai#11623) c1ce87c Cloud: create machines in the background; Create returns control immediately (manaflow-ai#11397) (manaflow-ai#11421)
This was referenced Sep 30, 2026
This branch was successfully deployed
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.
Two unapplied Cloud VM migrations relabel rows on a retired provider without touching
status.20260901120000_remove_blaxel_vm_providerturned a running Blaxel machine into a running e2b machine;20260902060000_remove_e2b_daytona_vm_providers(#11590) turns a running e2b or Daytona machine into a running Freestyle machine that the Freestyle driver cannot find. Both files now mark every non-destroyed row on a retired provider destroyed first (status, destroyed_at, updated_at, failure_codeprovider_retired, a provider-specific failure_message), the waymarkDestroyeddoes at runtime, and only then relabel for the enum rebuild. Reads already hide destroyed rows, and a base whose active machine is destroyed opens a fresh generation on the default provider.The Blaxel file is commit f75673f re-applied verbatim; it was reverted from #11587 so the read-path fix could ship during the incident. Its dry run against production inside a rolled-back transaction retired 8 rows and relabeled 17. The E2B/Daytona file mirrors its structure.
Provider comparisons are cast to
::textin both files. On a fresh database every migration runs in one transaction and Postgres rejects an enum literal for a label added by an earlierALTER TYPE ... ADD VALUE("unsafe use of new value").daytonais such a label; today it resolves only because the Blaxel rebuild re-creates the type immediately before.20260902090000_cloud_vm_private_networkssorts after both and creates its tables against the rebuilt type, so ordering is unaffected.This PR assumes both migrations are still unapplied in staging and production, as f75673f's message states. No read-only staging status command is documented in the cloud-vm-ops skill, so I could not confirm it. drizzle's migrator skips any migration whose folder name is already present in
drizzle.__drizzle_migrations, so editing an applied migration is silently ignored. The operator must check that table before applying.Operator steps, in order:
select name from drizzle.__drizzle_migrations where name like '2026090%'on staging and production and confirm neither20260901120000_remove_blaxel_vm_providernor20260902060000_remove_e2b_daytona_vm_providersis listed; delete the live Blaxel, E2B, and Daytona sandboxes in their provider consoles (the migration only records that they are gone);bun run cloud-vm:migrate -- staging, verify, thenbun run cloud-vm:migrate -- production.Verification:
bun run db:checkpasses.bun run cloud-vm:preflight -- .applied the full migration set twice to a fresh Docker Postgres (both migrations included) anddb-schema.test.tspassed. The behavior-test phase then had 83 failures across 7 files, every one a 5000ms per-test timeout under a local load average of 30 (other agents' builds); none touches these migrations. A rerun of those 7 files against a fresh test database with a 120s per-test timeout passed every test (12, 26, 35, 24, 1, 1, 80). After that fresh rundrizzle.__drizzle_migrationslisted both migrations andenum_range(null::vm_provider)was{freestyle}.bun run typecheckexits 0.bun test tests/vm-retired-provider-rows.test.tspasses.Local
$autoreview(gpt-5.6-sol, high) returned one P1 claiming the Blaxel file does not rewritecloud_vm_bases.active_providerorcloud_vm_base_generations.provider. It does (lines 42-43); those lines are unchanged against main, so they are outside the diff hunk the reviewer read, and theDROP TYPEinterlock passing on the fresh database proves no column still referenced the old type. No code change was made for it.Supersedes #11582, which only added the text cast to the Blaxel file (main already carries that cast).
https://claude.ai/code/session_01AvkeWizggvvUAngHyB7JUQ