Current Behavior
When the GitLab integration fails or gets restarted, all webhooks are failing. After a few retries, these webhooks are marked as failed and disabled, potentially for up to 24 hours. This behavior is documented in the GitLab webhook documentation: https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#temporarily-disabled-webhooks
Desired Behavior
The integration should handle scenarios where webhooks fail due to integration issues or restarts. As part of the existing resync process, the integration should automatically test and enable the configured webhooks to ensure continued functionality.
Proposed Solution
Enhance the existing resync mechanism in the GitLab integration:
Add a new step in the resync process to handle webhook validation and enabling.
For each configured webhook, send a test request to the webhook using the GitLab API.
Benefits
Improved reliability of the GitLab integration.
Reduced downtime for webhook-dependent processes - consistently working real time updates.
Decreased manual intervention required to maintain webhook functionality.
Seamless integration with the existing resync process.