fix(deployments): retire inactive-version side effects by row with bounded outbox continuation - #7405
Conversation
…unded outbox continuation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThe PR replaces deployment-version-by-version cleanup with bounded, row-oriented cleanup and adds non-attempt-consuming outbox continuations.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains established in the eligible follow-up scope. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/core/outbox/service.ts | Introduces a named helper for bounded continuations that defer processing without consuming the event's attempt budget. |
| apps/sim/lib/webhooks/deploy.ts | Adds bounded inactive-version webhook cleanup with provider teardown, per-row activation and candidate checks, and continuation signaling. |
| apps/sim/lib/workflows/deployment-outbox.ts | Reworks inactive and undeployed side-effect cleanup around bounded row processing, checkpoints, continuations, and abort-aware execution. |
| apps/sim/lib/workflows/persistence/deployment-operations.ts | Centralizes lookup of the deployment version protected by the current in-flight operation. |
| apps/sim/lib/workflows/schedules/deploy.ts | Adds transactional bulk deletion of inactive deployment schedules while fencing superseded operations and protecting the current candidate. |
Sequence Diagram
sequenceDiagram
participant O as Outbox worker
participant H as Deployment handler
participant S as Schedule cleanup
participant W as Webhook cleanup
O->>H: Process cleanup event
H->>S: Delete inactive schedules with fences
S-->>H: Deleted or superseded
H->>W: Retire up to 20 stale rows
W-->>H: hasMore
alt Rows remain
H-->>O: Continue without consuming attempt
O->>H: Retry after backoff
else Cleanup complete
H-->>O: Complete event
end
Reviews (2): Last reviewed commit: "fix(deployments): fence webhook teardown..." | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 15 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
…ort in undeploy cleanup
|
@cubic-dev-ai review this PR |
@icecrasher321 I have started the AI code review. It will take a few minutes to complete. |
Summary
continueOutboxHandlerto the outbox service (defer without consuming an attempt) and use it at the existing bounded-continuation call sitesgetProtectedDeploymentVersionIdis the single query for the candidate version an in-flight operation is preparing; the boolean helper wraps itType of Change
Testing
bun run type-check,bun run lint, block-registry audit, andcheck:audits(45 audits) passChecklist