improvement(deployments): bugfixes for run-block, airtable + external sub management#5680
improvement(deployments): bugfixes for run-block, airtable + external sub management#5680icecrasher321 wants to merge 6 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…ment-bugs # Conflicts: # apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal.tsx
PR SummaryHigh Risk Overview Webhook and trigger execution gains generation-fenced stable registration ( Smaller fixes: Airtable Reviewed by Cursor Bugbot for commit 341b7e3. Configure here. |
|
bugbot run |
Greptile SummaryThis PR makes deployment status follow the real deployment lifecycle. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "address comments" | Re-trigger Greptile |
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 341b7e3. Configure here.
|
|
||
| if (!prepared.success) { | ||
| throw new Error(prepared.error) | ||
| } |
There was a problem hiding this comment.
Idempotent reactivate skips failed ops
High Severity
prepareWorkflowVersionActivation treats any idempotent hit as success without checking operation status or calling onPrepareTransaction. A retry that reuses a failed, stuck preparing, or dead-lettered attempt restores the draft, returns success with no outboxEventId, and never re-enqueues cutover, so fork rollback can report restored while the version never goes live.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 341b7e3. Configure here.
| eq(workflowDeploymentVersion.workflowId, workflow.id), | ||
| eq(workflowDeploymentVersion.isActive, true) | ||
| ) | ||
| ) |
There was a problem hiding this comment.
MCP still trusts isDeployed flag
Medium Severity
This change joins the active workflowDeploymentVersion to pin execution, but still admits MCP calls with workflow.isDeployed. The same PR’s deploy GET path already treats an active version snapshot as the source of truth because the legacy flag can disagree. Copilot check_deployment_status also reports isDeployed from the flag while attaching activeDeployment from the summary, so callers can see contradictory live state.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 341b7e3. Configure here.


Summary
Make deployment status truthful end-to-end: deployments now move through an explicit state machine (preparing → activating → active / failed / superseded) backed by an outbox with inline-first execution, so a version is only reported live once its webhooks, schedules, and external subscriptions actually exist. Webhook registration is rebuilt on stable, generation-fenced rows with create-before-delete cutover — a failed deploy can no longer take down the currently live version, leave ghost registrations that wedge future deploys, or silently swallow provider errors (now surfaced in the deploy modal, versions list, and API responses).
Type of Change
Testing
Tested manually
Checklist