Repository navigation
Conversation
|
Local Java test run: PASSED — details
Tests run locally
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
Commandsmvn -B package -pl openmetadata-service -am -Dspring-boot.repackage.skip=true -Dtest=AlertDiagnosticsStatusTest,ChannelDispatchTest,DataMigrationStepTest,DestinationFingerprintTest,DestinationSecretsTest,DestinationValidationTest,HealthAttributionTest,IngestionPipelineMigrationEntryPointTest,MigrationTest,MigrationWorkflowTest,ProfileWebhookSecretsTest,StoredWebhookSecretsTest,TickChannelsTest,WebhookAddressesTest,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 |
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
…nly status in the ADR
Code Review ✅ Approved 🔴 High riskRebinding legacy webhook credentials during the 2.1 migration could leave alerts unable to authenticate or send if ownership handling is wrong. Keeps webhook credentials stored before 2.1 working through the upgrade by binding each to its owning destination, stops the upgrade before any encryption when the configured key cannot open stored credentials, and reports destinations that cannot send on alerts and in the UI. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
No linked issue. Follows PR #36939, PR #36722 and PR #37269. Backport to
2.1: PR #37788.Webhook credentials that worked before 2.1 keep working after the upgrade, a wrong encryption key no longer damages them, and the UI now shows a webhook that cannot send and why.
StoredCiphertextCopiesis removed.FERNET_KEYopens none of them, it stops with an error that names the setting and the alerts, and records no marker, somigrateruns again once the key is fixed. It stopsmigrate --forcetoo. When those values could not be used before the upgrade either,MIGRATION_KEEP_UNREADABLE_WEBHOOK_CREDENTIALS=truecontinues and leaves them as stored, to be entered again on their alerts.statusDetailsreports a destination whose stored credential does not open as failed, with the reason and a new optionalconfigurationUnusableflag, before any event reaches it. A send can find causes a read cannot, such as an endpoint the URL policy refuses. It stores that status with a fingerprint of the destination's settings, and the status stays until those settings change: renaming the alert or editing another destination keeps it, entering the value again clears it. A send that failed or waits for a retry keeps its own status, without the flag. The server owns the status: one sent with the alert is never stored.Type of change:
High-level design:
MigrationProcess.preflight(Handle)(default no-op) runs on every pending process before any of them migrates. Both engines'v210/Migration.javaoverride it withWebhookSecretsMigration.requireKeysThatOpenStoredCredentials, which throwsMigrationHaltException;MigrationWorkflowrethrows it even under--force. The check is skipped on a database with no alerts table or migration log yet and once the alert step has run, and bypassed by the opt-in. The alert step then binds what opens and leaves the rest as stored.AlertDiagnostics,DestinationStatuses,DestinationFingerprint): the read decrypts the way a send does, builds no publisher and resolves no address, and reads the health of all listed alerts in one query. One builder makes the unusable status for both the read and the send. The fingerprint is a SHA-256 of the destination as stored (secrets still encrypted; id, status andenabledleft out), computed only when a send records the status.ProfileWebhookSecrets,WebhookAddresses): a webhook that does not open fails as one recipient of the destination. Profiles have no status, so reading a user or team decrypts nothing.configurationUnusableonsubscriptionStatus.json(never stored) and optionalconfigurationFingerprintondestinationHealth.json(in the health JSON). No migration is needed: both are optional and absent on existing rows.migrate; clearing a stored status on any save of the alert, which a rename would clear.Decision record:
docs/decisions/2026-11-03-a-webhook-secret-opens-only-where-it-was-written.md(amended).Tests:
Use cases covered
--force; with the right key it succeeds.Unit tests
WebhookSecretsMigrationTest,StoredWebhookSecretsTest,AlertDiagnosticsStatusTest,DestinationFingerprintTest,TickChannelsTest,ChannelDispatchTest,WebhookAddressesTest,ProfileWebhookSecretsTest,MigrationWorkflowTestandIngestionPipelineMigrationEntryPointTest.tsc: no errors in the changed files.--forceswallowing the halt, the check after the alert step ran, already-bound credentials, the opt-in, the flag, the batched health read, dropping a client-sent status, the retry statuses, and each UI surface).Backend integration tests
WebhookSecretsMigrationIT,ProfileWebhookSecretsITandWebhookSecretOwnershipIT: 17 tests onmysql-elasticsearch(block below). The alert IT set built with-amataa9f2f0fe3e: 46 run onpostgres-opensearchand 46 onmysql-elasticsearch, none failed, 2 skipped (AlertStateIT).Local Java test run: PASSED
bc81f83d2bdd(baseorigin/main)--scope full).Ingestion integration tests
Playwright (UI) tests
make playwright_affectedselects about 95 specs through shared alert and settings files. The relevant ones,Flow/NotificationAlerts,Flow/ObservabilityAlerts,Features/AIMode/AiObservabilityAlertsandFeatures/AIMode/ProfileNotificationTab, are pending, and no spec was added in this PR.Visual regression baselines
Manual testing performed
None by hand. The upgrade paths are covered by the ITs above on both engines; the UI by Jest.
UI screen recording:
pr37785_webhook_status.mp4
The recording predates the last round: its team page step no longer exists. A new one follows.
Checklist:
Fixes <issue-number>: <short explanation>(no issue for this PR)Fixes #<issue-number>above.REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.Self-review: independent passes against
REVIEW.mdonccfe74c1c7c,78128c678d4,c2df96bb930,68f52b50387,18f5ab26fd1andaa9f2f0fe3e. Every 🔴 is fixed: the key check runs before any version writes and before reading a migration log that may not exist yet; retry statuses count as not sending; a rename no longer clears a status a send stored (fingerprint,10e8de2773b). One 🔴 is answered instead: how credentials stored before 2.1 are carried over is kept as on 2.0, by decision (see the decision record). The last pass found no 🔴; three of its 🟡 are fixed inbc81f83d2bd(the fingerprint taken once a tick, an unused overload, a test half that could not fail), and one is accepted: a secret stored in plain text before an encryption key was configured is encrypted by the next save, which clears a stored status until the next send.docs/decisions/2026-11-03-a-webhook-secret-opens-only-where-it-was-written.mdamended.Known, out of scope:
CompiledTextTestfails onmaintoo. After a description or owner save, the alert details pages show statuses again only after a reload.