-
Notifications
You must be signed in to change notification settings - Fork 3.3k
improvement(webhooks): remove dead code #2965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryRemoved ~578 lines of dead code from webhook and workflow lifecycle management. The changes consolidate webhook CRUD operations to the deploy flow only, eliminating unused UI-driven webhook management. Key Changes
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant DeployAPI as Deploy API
participant WebhookDeploy as lib/webhooks/deploy
participant ExternalProvider as External Webhook Provider
participant DB as Database
participant ScheduleDeploy as lib/workflows/schedules/deploy
Note over Client,ScheduleDeploy: Workflow Deployment Flow
Client->>DeployAPI: POST /api/workflows/{id}/deploy
DeployAPI->>DB: Get current active version ID
DeployAPI->>DB: Create new deployment version
DeployAPI->>WebhookDeploy: saveTriggerWebhooksForDeploy(previousVersionId)
Note over WebhookDeploy,DB: Cleanup Phase
WebhookDeploy->>DB: Get all workflow webhooks
WebhookDeploy->>ExternalProvider: Delete subscriptions for previous version
WebhookDeploy->>DB: Identify webhooks to delete/recreate
Note over WebhookDeploy,ExternalProvider: Two-Phase Creation
loop For each new webhook
WebhookDeploy->>ExternalProvider: Create external subscription
ExternalProvider-->>WebhookDeploy: Return subscription details
end
WebhookDeploy->>DB: Insert all webhooks in transaction
WebhookDeploy-->>DeployAPI: Success
DeployAPI->>ScheduleDeploy: createSchedulesForDeploy()
ScheduleDeploy->>DB: Delete orphaned schedules
ScheduleDeploy->>DB: Create/update schedules
ScheduleDeploy-->>DeployAPI: Success
DeployAPI->>ScheduleDeploy: cleanupDeploymentVersion(previousVersionId, skipExternalCleanup=true)
ScheduleDeploy->>DB: Delete previous version webhooks/schedules
DeployAPI-->>Client: Deployment successful
|
|
@cursor review |
apps/sim/app/api/v1/admin/workflows/[id]/versions/[versionId]/activate/route.ts
Outdated
Show resolved
Hide resolved
|
@cursor review |
|
@cursor review |
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Summary
Code quality improvement for webhooks
Type of Change
Testing
Tested manually. Webhook/Schedule Lifecycle
Checklist