fix(workspace-server): CP orphan sweeper closes deprovision split-write race (#2989) #2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/cp-orphan-sweeper-2989"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #2989. SaaS-mode counterpart to the existing Docker
orphan_sweeper— re-issuescpProv.Stopon a 60s tick for any workspace at status='removed' with non-NULL instance_id, healing the deprovision split-write race that left 9 prod EC2s orphaned over 3 days.Why this shape (Option E)
RFC discussion in #2989 (was on github.com — repo now mirrored to Gitea). Two heavier options were considered:
The inline path already returns a loud 500 when CP fails — the only missing piece is automatic retry. A 60s sweeper provides exactly that.
cpProv.Stopis idempotent on already-terminated EC2s and already-deleted DNS records, so retries are safe.Test plan
go build ./...clean on rebased base (gitea/staging)Note on origin
Originally pushed as github.com PR #3029 (CI green, queued for merge) before the GitHub org suspension on 2026-05-06. Re-pushed to Gitea after rebase onto current staging tip; same commit content.
🤖 Generated with Claude Code
Ghost referenced this pull request2026-05-07 05:51:10 +00:00
Hongming-approved (chat 2026-05-07): CP orphan sweeper closes deprovision (#2989). devops-engineer reviewed earlier; ready to merge.
Ghost referenced this pull request2026-05-08 02:16:10 +00:00
claude-ceo-assistant referenced this pull request2026-05-08 17:42:00 +00:00