Apply automatic disabling of failed web hooks to integration web hooks

About

Some integrations have a webhook that is triggered when the integration executes (these are models that mixin the HasWebhook module, and the webhook model is ServiceHook). At time of writing these are:

  • BuildKite
  • Datadog
  • DroneCI
  • Jenkins
  • Packagist

The feature of automatically disabling webhooks was accidentally applied to integration webhooks https://gitlab.com/gitlab-com/dev-sub-department/section-dev-request-for-help/-/issues/35.

We decided to make an exemption for integration webhooks from being automatically disabled in !105453 (merged).

If we want to allow integration webhooks to be automatically disabled when they fail, then we should allow them to be enabled in the same way that regular webhooks are, which is by testing them and getting a success response (see https://gitlab.com/gitlab-com/dev-sub-department/section-dev-request-for-help/-/issues/35#note_1190374903).

Questions

We have a notice that displays when a project webhook has been automatically disabled, that works with project webhooks (not integration webhooks).

Would we want to have a similar notice display when an integration webhook has been disabled automatically?

Technical proposal

We could add code to Integrations::Test::BaseService#execute to pass through force: true which allows the hook to execute in the test without being blocked. If the result of the test is successful, BaseService#execute would then call #enable! on the hook. We'd revert !105453 (merged).

We would add documentation about the automatic disabling feature, and how to enable it.

Edited Sep 09, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading