feat: add outbound webhooks with at-least-once delivery #325
probelabs / Visor: quality
succeeded
Feb 28, 2026 in 1m 22s
✅ Check Passed (Warnings Found)
quality check passed. Found 1 warning, but fail_if condition was not met.
Details
📊 Summary
- Total Issues: 1
- Warning Issues: 1
🔍 Failure Condition Results
Passed Conditions
- global_fail_if: Condition passed
Issues by Category
Performance (1)
⚠️ services/webhook_service.go:785 - The transaction logic inUpdateWebhookis inefficient as it appears to create, delete, and then re-create webhook topics. The initialtx.Save(sub)likely cascades to create the new topics, which are then immediately deleted by the next statement, only to be created again. This create-delete-create cycle is redundant.
Powered by Visor from Probelabs
💡 TIP: You can chat with Visor using /visor ask <your question>
Annotations
Check warning on line 799 in services/webhook_service.go
probelabs / Visor: quality
performance Issue
The transaction logic in `UpdateWebhook` is inefficient as it appears to create, delete, and then re-create webhook topics. The initial `tx.Save(sub)` likely cascades to create the new topics, which are then immediately deleted by the next statement, only to be created again. This create-delete-create cycle is redundant.
Raw output
Refactor the transaction to be more explicit and efficient. First, update the scalar fields of the `WebhookSubscription` object while omitting the `Topics` association. Then, delete all existing topic associations. Finally, create the new topic associations. This avoids the redundant database operations.
Loading