Skip to content

fix(alerts): keep webhook credentials working through the 2.1 upgrade and show the ones that cannot send (backport 2.1 #37785) - #37788

Closed
manerow wants to merge 31 commits into
2.1from
fix/webhook-secrets-keep-working-2.1
Closed

manerow wants to merge 31 commits into
2.1from
fix/webhook-secrets-keep-working-2.1

Conversation

@manerow

@manerow manerow commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Backport of PR #37785 to 2.1. No linked issue, as in PR #37785.

Brings PR #37785 to 2.1 unchanged. Webhook credentials that worked before 2.1 keep working after the upgrade, a wrong FERNET_KEY stops the upgrade before any version writes anything, and the alert pages show a destination that cannot send and why, including a team or user webhook it targets. The full description, design and decision record are on PR #37785.

All 31 commits cherry-pick cleanly and make the same change on 2.1 as on main (98 files, the same lines).

Type of change:

  • Bug fix

High-level design:

See PR #37785.

Tests:

Unit tests and backend integration tests

Focused run on this branch, against origin/2.1: 188 unit tests and 17 integration tests on mysql-elasticsearch, all pass (block below). Jest on this branch: 2110 tests in the 216 alert, team and notification suites pass. Self-review, mutation checks and the ITs on both engines: see PR #37785.

Local Java test run: PASSED

  • Commit: a173387560dc (base origin/2.1)
  • Finished: 2026-11-14 13:50 UTC · 4.5 min
  • Scope: focused; merge readiness is not established. Broader steps deferred: 6 (run --scope full).
Step Scope Classes Tests Failed Skipped Min Result
unit openmetadata-service (15 classes) 15 188 0 0 1.3 passed
integration mysql-elasticsearch · parallel 3 17 0 0 3.2 passed

Playwright (UI) tests

See PR #37785 (pending there).

UI screen recording:

See PR #37785.


Summary by Gitar

  • Migration safeguard:
    • Stops the 2.1 upgrade before any write when no stored webhook credential opens with the configured FERNET_KEY
    • Adds MIGRATION_KEEP_UNREADABLE_WEBHOOK_CREDENTIALS so operators can proceed knowingly
  • Read-time status:
    • Reports unusable webhook secrets as failed in statusDetails and subscriptionStatus
    • Adds AlertStatusBadge status column to notification and observability alert lists
  • Team webhook widget:
    • Shows a not-sending badge under the webhook name with the reason
  • Destination UI:
    • Shows DestinationProblemAlert for unusable configurations and failed sends

This will update automatically on new commits.

@manerow
manerow requested review from a team as code owners November 13, 2026 15:33
@manerow
manerow requested review from karanh37 and mohityadav766 and removed request for a team November 13, 2026 15:33
@manerow

manerow commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

Local Java test run: PASSED — details

  • Commit: 1e1b3feb3854 (base origin/2.1)
  • The summary is in the PR description.

Tests run locally

  • unit · openmetadata-service (9 classes): AlertDiagnosticsStatusTest (3 passed), DataMigrationStepTest (4 passed), DestinationSecretsTest (33 passed), IngestionPipelineMigrationEntryPointTest (2 passed), MigrationTest (4 passed), MigrationWorkflowTest (48 passed), ProfileWebhookSecretsTest (17 passed), StoredWebhookSecretsTest (6 passed), WebhookSecretsMigrationTest (10 passed)
  • integration · mysql-elasticsearch · parallel: ProfileWebhookSecretsIT (5 passed), WebhookSecretOwnershipIT (4 passed), WebhookSecretsMigrationIT (5 passed)

Per-class counts come from the test reports, which can credit a test to the wrong class when classes run concurrently, and keep only the last run of a nested class that several test classes inherit. The summary's step totals are Maven's own counts.

Broader coverage not executed by this focused run

  • mvn -B package -pl openmetadata-service -am -Dspring-boot.repackage.skip=true -Dtest=AIContextMarkdownTest,AlertDiagnosticsStatusTest,AlertJobsOwnershipTest,AlertLedgerTest,AlertMetricsTest,AlertPublisherDeliveryTest,AlertReconcilerTest,AlertRowsTest,AlertingArchitectureTest,AuthenticationCodeFlowHandlerTest,BotTokenCacheTest,BuildSearchIndexDocTest,ChannelDispatchTest,DataMigrationStepTest,DestinationSecretGuardsTest,DestinationSecretsTest,DestinationValidationTest,DispatchIsolationTest,DispatchOrderTest,EmailPublisherTest,EmailPublisherTickBudgetTest,EventSubscriptionDaoDedupTest,HealthAttributionTest,ImpersonationRestrictionFilterTest,IngestionPipelineMigrationEntryPointTest,JwtFilterTest,MigrationCodeFingerprintTest,MigrationProcessImplTest,MigrationTest,MigrationUtilDataConsumerPolicyCacheTest,MigrationWiringTest,MigrationWorkflowDataMigrationTest,MigrationWorkflowReprocessingTest,MigrationWorkflowTest,MintedTokensAreRecognizedTest,OpenSearchVectorServiceChunkStagingTest,PersonaContextMarkdownTest,ProfileWebhookSecretsTest,RecipientResolutionTest,SelfDrivenDeliveryTest,StoredWebhookSecretsTest,TargetResolverTest,TickChannelsTest,UserProfileClaimsTest,UserResourceSignUpTest,UserUtilTest,WebhookRequestsTest,WebhookSecretStoresTest,WebhookSecretsMigrationTest,WorkflowHandlerSchemaUpdateTest,WorkflowRedeployEntryPointTest -Dsurefire.failIfNoSpecifiedTests=false
  • mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=parallel '-Dit.test=<498 classes>' -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
  • mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=global-state '-Dit.test=<34 classes>' -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
  • mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=rdf '-Dit.test=<37 classes>' -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
  • mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pcache-tests -DintegrationTests.lane=parallel -Dit.test=AlertStateIT,BundleWarmupCertificationIT,ContainerCacheCorrectnessIT,EntityCacheWriteOrderIT,OneTransactionFlushAtomicityIT,RelationshipCacheInvalidationIT,TagRenameCacheIT,UncachedReadIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
  • mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pcache-tests -DintegrationTests.lane=global-state -Dit.test=CredentialRedisDownIT,CredentialRedisNoRoundTripIT,SessionRedisMultiNodeIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
  • mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Ppostgres-opensearch -DintegrationTests.lane=parallel '-Dit.test=<71 classes>' -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
  • mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Ppostgres-opensearch -DintegrationTests.lane=global-state -Dit.test=ConversationSchemaMigrationIT,MetricMigrationIT,PatchTableEmbeddingIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
Impacted, not run locally (2)
  • ReindexBenchmarkIT → nightly: openmetadata-nightly k8s-java-it (scale-it)
  • EntityLoaderSmokeUIIT → nightly: openmetadata-nightly k8s-java-it (ui-it + embedded JavaUIIT)
Commands
mvn -B package -pl openmetadata-service -am -Dspring-boot.repackage.skip=true -Dtest=AlertDiagnosticsStatusTest,DataMigrationStepTest,DestinationSecretsTest,IngestionPipelineMigrationEntryPointTest,MigrationTest,MigrationWorkflowTest,ProfileWebhookSecretsTest,StoredWebhookSecretsTest,WebhookSecretsMigrationTest -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=parallel -Dit.test=ProfileWebhookSecretsIT,WebhookSecretOwnershipIT,WebhookSecretsMigrationIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 14, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🔴 High risk

The 2.1 credential migration rewrites stored webhook secrets and gates upgrades on FERNET_KEY; mishandling could strand alert delivery or block upgrades.

Backports the 2.1 webhook credential fix that keeps existing webhook secrets readable through the upgrade, halts the upgrade before any write when no stored credential opens with the configured FERNET_KEY, and surfaces unusable webhook destinations with their failure reason in the alert UI. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant