Repository navigation
Description
Detail Bug Report
Introduced in #34555 by @shah-harshit on Oct 5, 2026
Summary
- Context:
TableDetailsPageV1renders a Data Quality indicator badge (failing tests / open incidents / upstream issues) in the entity header viaDataQualityIndicator, driven bydqIndicatorCountsstate on the page component. - Bug: When navigating from one table to another (
/table/A→/table/B), the page component instance persists (no remount key in the routing chain) anddqIndicatorCountsis never reset on entity change, so table B's header displays table A's DQ badge until table B's three DQ API calls resolve. - Actual vs. expected: The new table's header paints with the previous table's red/amber indicator, wrong
data-level, wrong tooltip counts, and anaria-label/action claiming failing tests or open incidents on a table that has none; expected behaviour is that the counts reset toEMPTY_DQ_INDICATOR_COUNTSwhen the table FQN changes. - Impact: A table with a clean data-quality record is shown with a red "failing tests" alert badge and a click-through action pointing at its own profiler Data Quality tab — actively wrong data-quality information presented to the user during every table-to-table navigation, lasting as long as the DQ API round-trip (hundreds of ms to seconds).
Code with Bug
openmetadata-ui/src/main/resources/ui/src/pages/TableDetailsPageV1/TableDetailsPageV1.tsx
const [dqIndicatorCounts, setDqIndicatorCounts] =
useState<DataQualityIndicatorCounts>(EMPTY_DQ_INDICATOR_COUNTS);badge={
<DataQualityIndicator
counts={dqIndicatorCounts}
tableFqn={tableFqn}
/>
}useEffect(() => {
if (!loadedTableFqn) {
return;
}
let isCurrent = true;
void fetchDqIndicatorCounts(() => isCurrent);
return () => {
isCurrent = false;
};
}, [loadedTableFqn, fetchDqIndicatorCounts]);const fetchDqIndicatorCounts = useCallback(
async (isCurrent: () => boolean) => {
if (!tableClassBase.getAlertEnableStatus()) {
setDqIndicatorCounts(EMPTY_DQ_INDICATOR_COUNTS); // <-- BUG 🔴 only reset path; does not run when alerts are enabled
return;
}
// ...three concurrent API calls via Promise.allSettled; setDqIndicatorCounts({...}) happens only after they resolveExplanation
dqIndicatorCountsis stored as local state onTableDetailsPageV1, and the router does not remount the page component when navigating between tables of the same entity type.- When
loadedTableFqnchanges, the effect triggers a refetch but does not synchronously resetdqIndicatorCounts. - In the alerts-enabled path (
getAlertEnableStatus() === true), the state remains whatever it was for the previous table until the three network calls settle and update it, so the header badge renders stale counts for the newly navigated table. DataQualityIndicatoris a pure renderer and will display any stalecountsit receives.
Codebase Inconsistency
The same stale-window issue was previously addressed for the sibling Queries badge (resetting to 0 on entity change), but no equivalent reset/keying was added for dqIndicatorCounts.
Failing Test
A Jest repro test was executed using a single MemoryRouter and client-side navigation from /table/table_a to /table/table_b while table B’s DQ calls were deferred. While table B’s header was already rendered, the DQ badge still showed table A’s data-level="failing" until the deferred promises resolved (then the badge disappeared for all-zero counts).
Recommended Fix
Reset the counts on table change so the previous table’s badge cannot paint while fetches are in flight:
useEffect(() => {
setDqIndicatorCounts(EMPTY_DQ_INDICATOR_COUNTS);
}, [loadedTableFqn]);History
This bug was introduced in commit 7609c8ce5d ("Fixes #34207: Keep table DQ indicator visible while an incident is open (#34555)") which added dqIndicatorCounts and its fetch logic but placed the only synchronous reset inside the alerts-disabled early-return branch; in the alerts-enabled path the previous table’s counts persist until the new fetch completes.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity