Skip to content

Remove legacy Webhook v1 logic for all VCS providers in 2.36.0 #4067

Backlog

Description

@alfespa17

Summary

Remove all legacy per-workspace Webhook v1 (/webhook/v1/{webhookId}) code paths, endpoints, configuration flags, and UI migration controls across all VCS providers (GITHUB, GITLAB, AZURE_DEVOPS, AZURE_SP_MI, and BITBUCKET) in Terrakube 2.36.0.

Why Webhook v1 Is No Longer Needed

  1. Full VCS Coverage on Webhook v2: Every webhook-capable VCS provider (GitHub, GitLab, Azure DevOps / AZURE_SP_MI, and Bitbucket) now supports shared repository webhooks (/webhook/v2/{repoWebhookId}).
  2. v2-Only Creation & Default Disabled: New webhook setups in both the API and UI exclusively create Webhook v2, and /webhook/v1/{webhookId} is disabled by default (returning 404 Not Found).
  3. Automated Startup Migration: Remaining unmigrated workspaces are automatically migrated sequentially on API startup via the @DisallowConcurrentExecution Quartz job (WebhookV1ToV2MigrationJob), ensuring all workspaces are on v2 prior to 2.36.0.

Reference Migration Stack

Proposed Removal Scope for 2.36.0

  • API Controller & Security: Remove POST /webhook/v1/{webhookId} from WebHookController and /webhook/v1/** from DexWebSecurityAdapter.
  • Webhook Services & Providers: Remove v1 webhook processing, creation, update, and deletion methods (WebhookService.processWebhook, createOrUpdateWorkspaceWebhook, deleteWorkspaceWebhook, and per-provider v1 helpers in GitHubWebhookService, GitLabWebhookService, AzDevOpsWebhookService, and BitBucketWebhookService). Note: keep WebhookService.triggerPolledPush or relocate it if Azure DevOps outbound polling still relies on it.
  • Configuration & Migration Job: Remove io.terrakube.webhook.v1.disabled, io.terrakube.webhook.v1.migration-on-startup, WebhookProperties.V1, and the temporary WebhookV1ToV2Migration* Quartz scheduler/job/service classes once the migration window has elapsed.
  • Elide Hooks & Entity Cleanup: Simplify WebhookManageHook and WebhookEventManageHook to assume v2 unconditionally (and evaluate dropping/deprecating Webhook.migratedV2 and Webhook.remoteHookId via Liquibase if no longer needed).
  • UI: Remove the one-way "Migrate to shared webhook" control and legacy v1 remoteHookId display from ui/src/domain/Workspaces/Settings/Webhook.tsx.
  • Tests: Remove legacy /webhook/v1/** unit and integration tests.

Activity

  1. added this to the 2.36.0 milestone on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions