Repository navigation
fix: apps no longer create alerts from their definition, and user credentials stay out of change events - #36251
Conversation
❌ 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 |
d2b8f6d to
fee1b75
Compare
fee1b75 to
5be0a91
Compare
fc5dd0a to
c8ea1c5
Compare
68838a0 to
0984f20
Compare
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
…nd-user-secrets # Conflicts: # bootstrap/sql/migrations/native/2.1.0/mysql/postDataMigrationSQLScript.sql # bootstrap/sql/migrations/native/2.1.0/postgres/postDataMigrationSQLScript.sql # openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/OntologyConceptRepository.java
🚦 Removed from the merge queue —
|
…nd-user-secrets # Conflicts: # bootstrap/sql/migrations/native/2.1.0/mysql/postDataMigrationSQLScript.sql # bootstrap/sql/migrations/native/2.1.0/postgres/postDataMigrationSQLScript.sql
Code Review ✅ Approved 3 closed / 3 findings🔴 High risk · The 2.1 migration rewrites stored events, versions, and alert relationships; incorrect targeting could remove history or disable legitimate app notifications. Removes app-definition alert creation and keeps app-created alerts linked through the server-side relationship, with secrets masked from change events and version history. Resolved this session: added decision records for the two new rules, relationship tests now verify the stored link rather than mock calls, and app history tests check the stored version. No issues found. ✅ 3 closed✅ Quality: Two new rules (no app alerts, secret fields kept from history) lack records
✅ Quality: Relationship tests only check mock calls, never the stored link
✅ Quality: App history tests now only check the list, not the stored version
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:
Five commits; review commit by commit.
Apps used alerts (event subscriptions) in two ways:
AppRepository.addEventSubscription(Collate's Reverse Metadata app on 2.0). This stays.1. Apps no longer create alerts from their marketplace definition.
eventSubscriptionsleaves both definition schemas and the install code (400 if sent).app.jsonkeeps it (pattern A). Three generated enums are pinned toorg.openmetadata.schema.entity.events, so most files only change an import.2. Only the server records the alerts an app creates.
App.eventSubscriptionsis filled on read from the app→alertCONTAINSrelationship, never stored, and cannot be patched.3. Credentials stay out of change events and version history.
"mask": trueon the user'sauthenticationMechanism.ChangeEventDAO.insertandinsertBatchmask every event (ChangeEventMasking).4. Every entity version is written by one method.
EntityRepository.storeVersionswrites all versions and leaves out one list of fields: the ones the schema masks as a whole, plus the ones a repository adds throughgetFieldsHiddenFromHistory. Bulk updates and the data product detach used to skip it; the App and OntologyConcept overrides become hidden-field lists.VersionHistoryArchitectureTestfails on any other method that writes a version.5. The bot token in server connections is masked, and a test checks every secret field. The
maskonOpenMetadataConnection.securityConfigsat next to a$ref, where the generator drops it; it now sits on the referenced schema.SecretFieldsAreMaskedTestfails on amasknext to a$ref, and on a password field reachable from an entity that is not masked.Migration (2.1.0, plain SQL)
In the unreleased 2.1.0 folder:
eventSubscriptionsand userauthenticationMechanismleave stored rows, versions and events.Decision records:
2026-10-26-an-apps-alerts-come-from-its-codeand2026-10-26-masked-fields-stay-out-of-change-events-and-version-history.Collate follow-up
Collate PR #7906 updates five files for the moved enums and must land with this one.
Type of change:
Tests:
Unit tests
VersionHistoryArchitectureTest,SecretFieldsAreMaskedTest,AppRepositoryEventSubscriptionsTest,ChangeEventMaskingTest,MaskedFieldsTest.Backend integration tests
AppEventSubscriptionRemovalIT: a definition cannot carry alerts and an install creates none; an app's alert list cannot be patched; deleting an app leaves another user's alert alone.UserSecretsIT: no token in bot events, versions or history.Upgrade run twice on seeded 2.0.6 MySQL and Postgres.
Replaces PR #36236 and PR #36237.
Ingestion integration tests
Playwright (UI) tests
Checklist:
The existing schema-loading rule violation must be fixed before merging; the latest JSON key reordering adds no new blocker.
Findings
Summary
Removes alerts from app marketplace definitions and keeps app-created alerts in relationships.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR AppCode[App code creates an alert] --> Relationship[App-to-alert relationship] Relationship --> AppReads[Single and list app reads] Event[Change event] --> Mask[ChangeEventMasking] Mask --> EventStore[Stored event] Update[Entity update] --> Versions[storeVersions] Versions --> History[History without hidden fields]Reviews (11) · Last reviewed commit: "Update generated TypeScript types and de..." · Reviewed by Greptile