Repository navigation
refactor(alerts): one alert catalog file with every definition written once - #33968
Conversation
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
✅ Playwright Results — workflow succeededValidated commit ✅ 3451 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 1h 13m 37s ⏱️ Max setup 4m 54s · max shard execution 24m 21s · max shard-job elapsed before upload 27m 53s · reporting 9s 🌐 213.30 requests/attempt · 2.01 app boots/UI scenario · 42.51% common-shard skew Optimization targets still in progress:
🟡 1 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
…ten rules and watch several sources
…way the page provides them
…health stores only what ticks report
…channel is grouped from
…stopping flag and recipient lookups
…ed once and health per destination
…, fails the event with its reason
🚦 Removed from the merge queue —
|
Code Review ✅ Approved🟡 Medium risk · The alert catalog refactor changes server startup and alert-definition building behavior. Consolidates alert source, filter, and trigger definitions from three JSON files into one, eliminating duplication and drift. Each definition is written once, sources declare their supported filters and triggers, and the catalog validates on server startup with clear error messages naming any inconsistencies. No issues found. OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
| Count | Rule |
|---|---|
| 14 | react-hooks/exhaustive-deps |
| 13 | openmetadata-imports/no-lower-layer-page-imports |
| 1 | openmetadata-imports/no-cross-page-imports |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:34:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:108:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:139:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'getResourcePermission' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:145:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchTemplates'. Either include it or remove the dependency array. |
| 🟡 | src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:149:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchFunctions'. Either include it or remove the dependency array. Outer scope values like 'Fqn' aren't valid de |
| 🟡 | src/components/Alerts/AlertFormSourceItem/AlertFormSourceItem.tsx:114:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'form'. Either include it or remove the dependency array. |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationFormItem.component.tsx:36:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationFormItem.component.tsx:72:9 |
react-hooks/exhaustive-deps |
The 'destinations' logical expression could make the dependencies of useMemo Hook (at line 86) change on every render. To fix this, wrap the initialization of ' |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationFormItem.component.tsx:72:9 |
react-hooks/exhaustive-deps |
The 'destinations' logical expression could make the dependencies of useCallback Hook (at line 146) change on every render. To fix this, wrap the initialization |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationFormItemFormBridge.tsx:19:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationSelectItem/DestinationSelectItem.tsx:60:9 |
react-hooks/exhaustive-deps |
The 'destinationItem' logical expression could make the dependencies of useMemo Hook (at line 105) change on every render. To fix this, wrap the initialization |
| 🟡 | src/components/observability/Alerts/AlertAiDestinationSection.component.tsx:60:9 |
react-hooks/exhaustive-deps |
The 'destinations' logical expression could make the dependencies of useCallback Hook (at line 107) change on every render. To fix this, wrap the initialization |
| 🟡 | src/components/observability/Alerts/AlertAiFormFields.component.test.tsx:47:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/Alerts/AlertAiFormFields.interface.ts:24:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/Alerts/AlertAiFormFieldsSearchUtils.ts:20:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/Alerts/AlertDetailsPage.test.tsx:29:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/Alerts/AlertDetailsPage.tsx:46:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/Alerts/AlertEditModal.component.test.tsx:30:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/Alerts/AlertEditModal.component.tsx:25:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/Alerts/AlertEditModal.component.tsx:29:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:85:1 |
openmetadata-imports/no-cross-page-imports |
Page features must not import another page feature. Move shared code to components, hooks, interfaces, or pure utilities. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:148:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:193:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'fetchAlert' and 'fetchFunctions'. Either include them or remove the dependency array. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:221:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'getResourceLimit' and 'setInlineAlertDetails'. Either include them or remove the dependency array. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:282:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'getResourcePermission' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:288:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchTemplates'. Either include it or remove the dependency array. |
| 🟡 | src/utils/Alerts/AlertsUtil.test.tsx:36:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/utils/Alerts/AlertsUtilPure.ts:42:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed
|
|



Fixes #20504
What this pull request implements
The catalog of alert sources, filters and triggers moves from three JSON files into one. In the new file each filter and trigger is written once, and every source names the ones it supports. Each source also says which recipient categories it offers, for example Owners or Followers.
The catalog is loaded when the server starts. If it cannot be loaded, the server stops with an error that names the file and the entry, instead of starting with alerts that cannot be built.
What was wrong before
The notification sources named their filters, the filter definitions sat in a second file, and every observability source carried full copies of its filters and triggers in a third. The copies had started to drift apart, and a fix to one definition had to be made in several places.
Design
AlertCatalogreads the file and answers two different questions:AlertCatalogExceptionis raised when the file cannot be read or an entry is inconsistent, for example a source naming a filter that is not defined. Its message names the file and the entry at fault.What users notice
Nothing in the alert form or the API: the catalog the server serves is the same. A server with a broken catalog refuses to start with a clear message.
How it was tested
The alerting unit tests (48 classes, 422 tests) and the existing alert integration tests (564 tests) pass on MySQL and on PostgreSQL.
AlertCatalogTestpins the condition of every definition and checks that every source, filter and trigger combination an earlier release shipped still builds.