Improve the reliability of webhooks: Auto-disable Failing Webhooks
### Release notes In order to protect the GitLab and users across the system from the potential abuse or misuse of a small few, we'll be implementing a feature to disable webhooks that fail consistently. Webhooks that return response codes in the 5xx range are understood to be failing intermittently, and are temporarily disabled. This lasts initially for 10 minutes. If the hook continues to fail, the back-off period is extended on each retry, up to a maximum disabled period of 24 hours. Webhooks that fail with 4xx errors will be disabled and a project owner or maintainer will be alerted in-app and directed to the webhooks page where they may investigate and re-enable failed webhooks. ### Background In order to move forward with a smaller (low risk) iteration of https://gitlab.com/gitlab-org/gitlab/-/issues/355844. We can display a generic [alert on all Project pages](https://gitlab.com/gitlab-org/gitlab/-/issues/355844/designs/webhook-project-home.png) (not just the webooks page) that would communicate when one or more webhooks have failed to connect or were automatically disabled. Once the user navigates to the Webhooks page, that is where they will see a more specific alert related to the issue. ### Conditions - The alert should only be visible to Project owners and maintainers. - The alert should be visible on all pages of the Project. - Once the alert is dismissed, we do not show it again unless a new webhook(s) fails. - IF multiple webhooks are failing, we should [avoid stacking alerts](https://design.gitlab.com/components/alert#multiple-alerts) and instead show an alert with a more generic message: | Generic message | | ------ | | ![webhook-project-generic-alert](/uploads/bbd1421627a0091f31e7831278429995/webhook-project-generic-alert.png)| ### Design source :pencil2: [Figma project](https://www.figma.com/file/QkTXmhbfZTuyjEaeGYz3Sh/UX-considerations-for-auto-disabled-and-rate-limited-webhooks-%23331407-(backup)?node-id=2047%3A14395) ## Next Steps - [x] Complete these 3 issues in %"15.6" and re-enable for SaaS: - [x] https://gitlab.com/gitlab-org/gitlab/-/issues/375170+ - [X] https://gitlab.com/gitlab-org/gitlab/-/issues/375714+ - [x] https://gitlab.com/gitlab-org/gitlab/-/issues/375147+ - [ ] We would release as well to Self-Managed for %"15.6", requiring a separate release post for making this FF enabled by default - [ ] https://gitlab.com/gitlab-org/gitlab/-/issues/374991+ - implement with or soon after so we can monitor failures - [ ] Follow-up iterations to improve the experience for users - [ ] https://gitlab.com/gitlab-org/gitlab/-/issues/374749+ - [ ] https://gitlab.com/gitlab-org/gitlab/-/issues/372237+ <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION --> *This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.* <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
epic