Skip to content

fix(dq-dashboard): add Certification filter dropdown to Data Quality dashboard#28085

Open
manerow wants to merge 8 commits into
mainfrom
fix/dq-cert-ui
Open

fix(dq-dashboard): add Certification filter dropdown to Data Quality dashboard#28085
manerow wants to merge 8 commits into
mainfrom
fix/dq-cert-ui

Conversation

@manerow
Copy link
Copy Markdown
Contributor

@manerow manerow commented May 13, 2026

Fixes open-metadata/openmetadata-collate#4080

What was wrong

Two places on the Data Observability dashboard silently lost certified assets:

  1. The global dashboard's Tag filter listed certifications (Gold/Silver/Bronze), but selecting one returned zero coverage — the dashboard was querying the wrong field.
  2. The Data Observability tab on a Certification tag's detail page (e.g. /tag/Certification.Gold) reported zero coverage for the same reason — the page told the dashboard to filter by tags, but certification doesn't live in the tags array.

What this PR changes

  • Adds a dedicated Certification dropdown to the dashboard filter row, sitting next to Tier. It loads Bronze/Silver/Gold from the Certification classification.
  • Stops listing Certification tags inside the generic Tag dropdown — they live in their own filter now, no double-counting.
  • Fixes the Tag detail page: when you visit a Certification tag, the embedded dashboard receives the certification through the correct filter key, so charts actually populate. The Certification filter is hidden on that page since it's already implied by the URL.
  • Adds a Playwright spec to pin the new behavior end-to-end.

Depends on

Scope

  • Targets main and 1.13 only — on 1.12.x the dashboard component lives in the Collate repo (separate PR: open-metadata/openmetadata-collate#4079).
  • The Tag detail page's "Data Observability" tab is a 1.13+ feature, so no equivalent fix is needed for 1.12.x — the broken scenario simply doesn't exist there.

Test plan

Validated against a temp branch combining #28084 + this PR, deployed locally:

  • Playwright yarn playwright:run playwright/e2e/Features/DataQuality/CertificationFilter.spec.ts4/4 passing in ~9s.
  • Certification dropdown appears between Tier and Tag in the filter row.
  • Picking a Certification narrows both the table-index and testCase-index dashboard calls correctly (via certification.tagLabel.tagFQN).
  • Certification tags no longer appear in the generic Tag dropdown.
  • A Certification tag's detail page → Data Observability tab → embedded dashboard correctly reflects certified assets.
  • No regression on existing Tier / Tag / Glossary / Owner filters.

Follow-ups

  • Collate-side equivalent PR for 1.12.x: open-metadata/openmetadata-collate#4079.
  • A separate latent routing bug for Tier on testCase-driven widgets was discovered during this work. Not in scope here; tracked in open-metadata/openmetadata-collate#4086 with fix branch fix/dq-tier-routing.

@manerow manerow requested a review from a team as a code owner May 13, 2026 10:40
@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels May 13, 2026
@manerow manerow added UI UI specific issues and removed backend labels May 13, 2026
@manerow manerow self-assigned this May 13, 2026
@open-metadata open-metadata deleted a comment from github-actions Bot May 13, 2026
@manerow manerow force-pushed the fix/dq-cert-backend branch 3 times, most recently from 97b047e to ecc2413 Compare May 16, 2026 14:51
await afterAction();
});

function captureReports(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move the util function to a separate file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to utils/dataQuality.ts as captureReports.

await afterAction();
});

test.afterAll('cleanup', async ({ browser }) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not using afterAll unless it is required, since it takes up extra time to complete tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped.

storageState: 'playwright/.auth/admin.json',
});

const certTable = new TableClass();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's define the variables here and initlaize them in beforeAll.

Suggested change
const certTable = new TableClass();
let certTable:TableClass;
let cert: TagClass;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, switched both to let.

const cert = new TagClass({ classification: 'Certification' });

test.beforeAll('setup', async ({ browser }) => {
const { apiContext, afterAction } = await createNewPage(browser);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add initializzation here.

Suggested change
const { apiContext, afterAction } = await createNewPage(browser);
certTable = new TableClass();
cert = new TagClass({ classification: 'Certification' });
const { apiContext, afterAction } = await createNewPage(browser);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, init moved into beforeAll.

shah-harshit
shah-harshit previously approved these changes May 18, 2026
Base automatically changed from fix/dq-cert-backend to main May 18, 2026 07:19
@pmbrull pmbrull dismissed shah-harshit’s stale review May 18, 2026 07:19

The base branch was changed.

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 18, 2026

Code Review ✅ Approved 2 resolved / 2 findings

Adds a dedicated Certification filter dropdown to the Data Quality dashboard and routes tag pages through correct keys, resolving the search narrowing issue. No open issues found.

✅ 2 resolved
Bug: handleCertificationSearch progressively narrows options

📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQualityDashboard/DataQualityDashboard.component.tsx:438-452
The handleCertificationSearch function filters prev.options (the already-filtered state) instead of filtering from the full original list. If a user types "Go" (filtering down to Gold), then changes to "B" (expecting Bronze), the filter runs against the already-narrowed array that only contains Gold — Bronze will never appear unless the user clears the input entirely.

This is the same pattern used by handleTierSearch, so it's a pre-existing issue copied forward. However, since the Certification dropdown has only 3 tags (Bronze, Silver, Gold), the practical impact is low — the user would need to edit mid-search to trigger it. Still worth fixing for correctness.

Bug: Missing afterAll cleanup leaks test entities in CI

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/CertificationFilter.spec.ts:30-44
The previous commit had an afterAll block that deleted certTable and cert after the test suite completed. This delta removes it entirely without replacing it with an alternative cleanup mechanism (e.g., try…finally). Since neither TableClass nor TagClass has auto-cleanup, the Certification tag and table created in beforeAll will accumulate in the test environment on every run, potentially causing flaky tests or quota issues in CI.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants