Skip to content

fix(dq): backport #30464 to 2.0 — scope Data Observability locator + restore incident reopen - #30529

Closed
ShaileshParmar11 wants to merge 1 commit into
2.0from
bugfix/2.0-backport-dq-observability-locator
Closed

fix(dq): backport #30464 to 2.0 — scope Data Observability locator + restore incident reopen#30529
ShaileshParmar11 wants to merge 1 commit into
2.0from
bugfix/2.0-backport-dq-observability-locator

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What

Backports #30464 to the 2.0 release branch.

Why

2.0 Playwright E2E is red on the DataQuality and TestSuiteMultiPipeline shards with a strict-mode violation:

strict mode violation: getByText('Data Observability') resolved to 2 elements:
  1) getByTestId('profiler').getByText('Data Observability')                    (the tab)
  2) getByTestId('asset-health-row-dataObservability').getByText('Data Observability')  (Asset Health widget row)

The Asset Health widget added a second "Data Observability" text node, so the bare getByText('Data Observability') — including the one in the shared visitCreateTestCasePanelFromEntityPage helper (utils/dataQuality.ts) that nearly every DataQuality spec routes through — now matches two elements and fails. This was fixed on main by #30464 but 2.0 diverged before it landed, so it never got the fix.

Evidence: run 30228314274 — shard 3 (DataQuality) 100 hits, shard 5 (TestSuiteMultiPipeline) 14 hits, all the same collision.

What's included

Straight cherry-pick of #30464 (2ce362e00734), which contains:

  • the locator fix — scopes getByText('Data Observability') to getByTestId('profiler') in utils/dataQuality.ts and TestSuiteMultiPipeline.spec.ts (unblocks the whole DQ suite)
  • the accompanying product fix from that PR — restore in-place reopen of resolved incidents on the Test Case page (useTestCaseIncidentHeader.ts + tests)

Cherry-picked cleanly with no conflicts.

🤖 Generated with Claude Code

Greptile Summary

Restores reliable Data Quality navigation and resolved-incident reopening.

  • Scopes Playwright’s “Data Observability” locator to the profiler tab to avoid strict-mode collisions.
  • Requests inline incident status on Test Case detail pages and hydrates resolved incident/task state in the header.
  • Prevents stale asynchronous incident responses from overwriting state after navigation.
  • Adds unit and end-to-end coverage for resolved incident visibility and in-place reopening.

Confidence Score: 5/5

The PR appears safe to merge, with the locator and resolved-incident changes aligned with existing UI and backend contracts.

The scoped locators remove the demonstrated strict-mode collision, while incidentStatus is supported by the Test Case API and the hook safely resolves its associated task without allowing obsolete asynchronous responses to overwrite current state.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/IncidentManagerPageHeader/useTestCaseIncidentHeader.ts Adds resolved inline-status hydration, coordinated task/status loading, stale-response cancellation, and explicit state cleanup.
openmetadata-ui/src/main/resources/ui/src/pages/IncidentManager/IncidentManagerDetailPage/TestCaseClassBase.ts Requests the backend-supported incidentStatus field when loading Test Case details.
openmetadata-ui/src/main/resources/ui/playwright/utils/dataQuality.ts Scopes the shared Data Observability locator to the profiler container.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TestSuiteMultiPipeline.spec.ts Applies the scoped profiler locator to both multi-pipeline test flows.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/DataQualityDashboard.spec.ts Updates resolved-incident expectations and adds coverage proving an incident reopens without changing its state ID.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/IncidentManagerPageHeader/useTestCaseIncidentHeader.test.tsx Covers resolved inline status, ignored non-resolved inline status, task retrieval, and stale-state cleanup.

Sequence Diagram

sequenceDiagram
  participant Page as Test Case Page
  participant API as Test Case API
  participant Header as Incident Header
  participant Tasks as Task API
  Page->>API: Fetch test case with incidentStatus
  API-->>Page: Resolved inline incident status
  Page->>Header: Store test case data
  Header->>Tasks: Fetch task by status stateId
  Tasks-->>Header: Resolved incident task
  Header-->>Page: Show status and edit affordance
  Page->>API: Reopen incident
  API-->>Page: Same stateId with active status
Loading

Reviews (1): Last reviewed commit: "fix(dq): restore in-place reopen of reso..." | Re-trigger Greptile

…se page (#30464)

* fix(dq): restore in-place reopen of resolved incidents on the Test Case page

* fix(dq): guard incident-header effect against stale state and late responses

* fix(test): scope 'Data Observability' locator to profiler to avoid strict-mode violation

* fix(test): wrap Data Observability locator chain to satisfy prettier printWidth

(cherry picked from commit 2ce362e)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ShaileshParmar11
ShaileshParmar11 requested a review from a team as a code owner July 27, 2026 13:10
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Jul 27, 2026
@gitar-bot

gitar-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Backports the Data Observability locator scope and incident reopen fix from main to resolve strict-mode test failures in the 2.0 release branch. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@ShaileshParmar11
ShaileshParmar11 deleted the bugfix/2.0-backport-dq-observability-locator branch July 27, 2026 13:13
@ShaileshParmar11
ShaileshParmar11 restored the bugfix/2.0-backport-dq-observability-locator branch July 27, 2026 13:14
@ShaileshParmar11
ShaileshParmar11 deleted the bugfix/2.0-backport-dq-observability-locator branch July 27, 2026 13:15
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 65%
65.67% (76796/116932) 49.54% (46103/93054) 50.76% (13892/27365)

@sonarqubecloud

Copy link
Copy Markdown

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

Labels

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