Skip to content

refactor(alerts): one alert catalog file with every definition written once - #33968

Merged
manerow merged 22 commits into
feat/alerting-redesign-1-message-buildersfrom
feat/alerting-redesign-2-alert-catalog
Oct 6, 2026
Merged

manerow merged 22 commits into
feat/alerting-redesign-1-message-buildersfrom
feat/alerting-redesign-2-alert-catalog

Conversation

@manerow

@manerow manerow commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

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

AlertCatalog reads the file and answers two different questions:

  • What can be chosen today. This is what clients are served.
  • What any release has offered. Saved alerts are built from this, because an alert saved years ago may name a source, a filter or a trigger that is no longer offered, and it must still build.

AlertCatalogException is 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. AlertCatalogTest pins the condition of every definition and checks that every source, filter and trigger combination an earlier release shipped still builds.

@manerow manerow added the safe to test Add this label to run secure Github workflows on PRs label Sep 24, 2026
@manerow
manerow requested a review from a team as a code owner September 24, 2026 15:14
@manerow manerow added backend safe to test Add this label to run secure Github workflows on PRs labels Sep 24, 2026
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit fbbb31db1929e56269f5d72be564b3c7ef568f9f in Playwright run 37427452745, attempt 1.

✅ 3451 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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:

  • Common shard skew was 42.51% (convergence target: at most 15%).
  • Browser traffic was 213.3 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.01 per UI scenario (7365 boots / 3657 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard advanced-search-01 63 0 0 0 0 0
✅ Shard advanced-search-02 67 0 0 0 0 0
✅ Shard chromium-01 183 0 0 1 0 0
🟡 Shard chromium-02 189 0 1 0 0 0
✅ Shard chromium-03 157 0 0 0 0 0
✅ Shard chromium-04 179 0 0 0 0 0
✅ Shard chromium-05 209 0 0 0 0 0
✅ Shard chromium-06 180 0 0 0 0 0
✅ Shard chromium-07 207 0 0 0 0 0
✅ Shard chromium-08 206 0 0 0 0 0
✅ Shard chromium-09 244 0 0 0 0 0
✅ Shard chromium-10 202 0 0 0 0 0
✅ Shard chromium-11 185 0 0 0 0 0
✅ Shard chromium-12 185 0 0 0 0 0
✅ Shard chromium-13 186 0 0 0 0 0
✅ Shard chromium-14 189 0 0 0 0 0
✅ Shard chromium-15 192 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard global-state-01 68 0 0 0 0 0
✅ Shard import-export-01 95 0 0 0 0 0
✅ Shard import-export-02 57 0 0 0 0 0
✅ Shard ingestion-01 27 0 0 0 0 0
✅ Shard ingestion-02 39 0 0 0 0 0
✅ Shard ingestion-03 27 0 0 0 0 0
✅ Shard reindex-01 41 0 0 0 0 0
✅ Shard search-rbac-01 9 0 0 0 0 0
🟡 1 flaky test(s) (passed on retry)
  • Pages/Domains.spec.ts › Verify redirect path on data product delete (shard chromium-02, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 75%
75.74% (117309/154872) 61.5% (72158/117320) 62.89% (24089/38299)

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — stack_invalidated (2026-10-06T10:43:07Z)

Blocked the queue: integration-tests-postgres-opensearch

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — stack_invalidated (2026-10-06T13:07:12Z)

No failing check on merge-queue commit d9cb8ba — invalidated by an entry ahead in the queue, or a required check timed out.

manerow added 22 commits October 6, 2026 15:51
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-10-06T14:09:57Z)

The entry left the queue before it was built, so no checks ran against it.

@gitar-bot

gitar-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown
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.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

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

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 28 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 28 warning(s) across 16 changed file(s).

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

@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2026

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2026

Copy link
Copy Markdown

This branch was previously deployed

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

Labels

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Multi-Select in Notification Source

2 participants