Repository navigation
Incident groups backend: related entities, drill-down parity, paging, group lookup (superseded by #34599) - #34589
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 |
…lk severity - Group rows carry `tableCount`/`tables` and `testDefinitionCount`/ `testDefinitions`: the related entities the group's open incidents span, ranked by how many incidents carry them and capped at five, with exact counts. - The flat incident listing takes `unowned=true` to list the "No Owner" group's incidents, and `dateField` (createdAt|updatedAt) to apply the range to the incidents themselves, as the groups do, so a drill-down lists exactly what its group counted. - A bulk entry that keeps an open incident's status now only updates its severity instead of being silently skipped; an entry that changes nothing, or sends an open incident back to New, is reported as a failure rather than counted as applied. - A severity PATCHed on an incident's latest record now reaches the denormalized incident row the groups read their severity from.
A bulk entry that keeps an assigned incident with the same assignee only edits its severity, but the assignee was compared by name. An entry naming the assignee by id alone fell through to a reassign the workflow treats as a no-op, so the severity was dropped while the entry was reported as applied.
An Assigned request may name its assignee by id or name alone, and the record kept that partial reference. The incident lists then had no name to show, and the incident groups, which count assignees by name, left the assignee out. The mapper now resolves the reference before the record is written.
A test case is in its table's domain, but that domain is resolved at read time and leaves no relationship on the test case. The incident groups only matched a domain set on the test case itself, so in a domain scope they listed nothing for the usual test case. The flat listing ignored the domain parameter altogether, so a drill-down from a domain-scoped group listed incidents from every domain. Both now match the domain on the test case or on its table, found by the table's fqnHash prefix of the test case's.
The latest-record listing filters status and assignee on each incident's latest record, but its count filtered them before ranking. An incident resolved since still counted through its earlier open record, so the drill-down pager reported more incidents, and pages, than it listed. The count now applies the same outer filter, on a copy of the filter the listing reads afterwards.
The groups and the incident listing only handed out next and previous cursors, so a pager could not jump to a page or reach the last one. Both take a 1-based `page` now, turned into the cursor's offset on the server. Groups named their assignees by name only, which leaves a client unable to tell a user from a team, or to show a display name. They now also carry assigneeReferences, resolved in one lookup per page.
A drill-down link carries its group's key and nothing else, and the group may sit on any page of the listing. The groups endpoint now takes `group` to return just that group, matched on the key the dimension groups by — the table FQN, the test definition or owner id, or empty for the unowned bucket — so it counts exactly what the full listing counts.
An Assigned request that names its assignee without an id was looked up with the raw name, but the lookup takes an FQN: a name with a dot in it hashed as several segments and the request failed with not found. The name is now quoted, and lowercased for a user, the way the repositories build the FQN. A reference with neither an id nor a name is stored as sent.
- Resolve group assignees whatever case the incident row keeps their name in: users are looked up by their lowercased FQN and mapped back to the row's own name. - Only accept a user or a team as an incident assignee; any other type is rejected with 400. - Match a domain the test case's table inherits from its schema, database or service, in the groups and the flat listing. - Bind dateField as an enum and move the date range and owner/unowned handling of the flat listing into the repository. - Rank each group's related tables and test definitions in SQL so the page is bounded by its groups, not their incidents, and keep incidents whose test case lost its definition relationship in the counts. - Make the dateField IT fail when the range is applied to the wrong column.
Code Review ✅ Approved 2 closed / 2 findings🔴 High risk · Bulk status and severity changes alter persisted incident records and summaries. Adds backend support for grouped incidents with related entities, drill-down parity, pagination, and group lookup, but the domain filter matches ancestor domains even when a nearer entity overrides them, breaking domain-scoped accuracy. The ✅ 2 closed✅ Bug: Name-only assignee lookup uses raw name as FQN; dotted names fail
Closed: Bug: Domain filter matches ancestor domains a nearer entity overrides
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 |
|
|
|
Combined into #34599, which carries the whole grouped incident manager (backend and frontend) as one PR against |



Describe your changes:
Was for #34549 — superseded by #34599
Backend for the grouped incidents: what the group rows, the drill-down and the bulk changes need.
Group rows
tableCount/tablesandtestDefinitionCount/testDefinitions: the related entities their open incidents span, ranked by how many incidents carry them, capped at 5, with exact counts.assigneeReferences(user or team), resolved in one lookup per page.Drill-down parity
unowned=truefor the "No Owner" group, anddateField(createdAt/updatedAt) to apply the range to the incidents themselves, as the groups do.domain.Paging and lookup
page, so a pager can jump to any page.groupto return one group by its key (table FQN, test definition or owner id, or empty for the unowned bucket). A drill-down link can then name a group on any page.Bulk and severity
Behaviour changes:
Assignedstatus that names its assignee by a name that matches no user or team now returns 404 on single create (it used to store the name as sent). Assignees are looked up by FQN, so a dotted or mixed-case user name resolves.typeis neitherusernorteamreturns 400.ownerandunownedtogether still returns 400, now checked after authorization.Type of change:
High-level design:
TestCaseResolutionStatusResourceadds the new query params, validated at the boundary (400 on bad values).TestCaseResolutionStatusRepositoryresolves the references for a page in batches: related tables and definitions, assignees as users then teams.TimeSeriesDAOsholds the group SQL (one aggregate query, with the total fromCOUNT(*) OVER ()) and the latest-record listing. The listing filters status and assignee on the outer query, and its count now matches that. Each group's related tables and test definitions are ranked in SQL (top 5 per group withROW_NUMBER(), for the page's groups only), so the payload is bounded by the page, not by the incidents; the test definition join is aLEFT JOIN, so an incident whose test case lost its definition relation is still counted.ListFilter.testCaseInDomainConditionmatches the domain on the test case, on its table, or on what the table inherits it from — its schema, database or service — each found by itsfqnHashprefix. The groups and the flat listing share it.dateFieldis bound as an enum. The date range and theowner/unownedhandling of the flat listing live in the repository.testCaseIncidentGroup.json(a response-only schema) gainsassigneeReferences. Java and TS models are regenerated. Nothing is persisted, so no migration is needed.Tests:
Use cases covered
groupreturns exactly one group with the same counts.Unit tests
IncidentGroupsIT(below). JaCoCo was not run for this PR.Backend integration tests
openmetadata-integration-tests/for new/changed API endpoints.openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/IncidentGroupsIT.java— 54/54 pass on Postgres and on MySQL (-Pmysql-elasticsearch).Ingestion integration tests
Playwright (UI) tests
Manual testing performed
/observability/incident-manager.incidentGroupsand the flat listing with every new parameter and compared the totals: groups 1,817 = listing 1,817, and per domain (Marketing 226 = 226, Finance 309 = 309).UI screen recording / screenshots:
TODO: attach a recording (opened as draft until it is added).
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.testCaseIncidentGroup.jsonis a response schema; nothing stored changes, no migration needed.