Skip to content

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

Open
manerow wants to merge 4 commits into
mainfrom
fix/testcase-incident-reopen-affordance
Open

fix(dq): restore in-place reopen of resolved incidents on the Test Case page#30464
manerow wants to merge 4 commits into
mainfrom
fix/testcase-incident-reopen-affordance

Conversation

@manerow

@manerow manerow commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #30455

Problem

After #30182, a resolved DQ incident renders as "No Incident" on the Test Case page. That also removed the status edit control, so a resolved incident can no longer be reopened (Resolved -> Ack) in place -- the recovery path a user needs after resolving by mistake (#30168). Reopen was only possible from the global Incident Manager list.

Fix

The Test Case page now requests and reads the inlined incidentStatus field (added in #30157) and, when there is no ongoing incidentId, renders the resolved incident with its edit affordance so it can be reopened in place. Reopen continues the same incident (same stateId). incidentId semantics are unchanged, so auto-close and the Resolved-Incidents KPI are unaffected. The DQ dashboard tab already renders this via #30157.

Tests

  • Unit: the header hook renders the resolved inline status (and ignores a non-resolved one) when there is no incidentId.
  • E2E: the resolved incident shows its chip on the DQ tab, and reopening it from the Test Case page continues the same stateId.

🤖 Generated with Claude Code

Greptile Summary

Restores resolved-incident visibility and reopening on the Test Case page.

  • Requests the inline incidentStatus field and displays it when no active incidentId exists.
  • Coordinates incident-status and task loading with cleanup guards that prevent stale asynchronous writes during navigation.
  • Adds unit and end-to-end coverage for resolved incident display, state cleanup, and reopening with the existing stateId.
  • Tightens Data Observability selectors in related Playwright flows.

Confidence Score: 5/5

The PR appears safe to merge, with both previously reported stale incident-state failures addressed.

No blocking failure remains.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/IncidentManagerPageHeader/useTestCaseIncidentHeader.ts Adds resolved inline-status handling and addresses both previously reported stale-state paths through explicit clearing and effect cleanup.
openmetadata-ui/src/main/resources/ui/src/pages/IncidentManager/IncidentManagerDetailPage/TestCaseClassBase.ts Requests incidentStatus alongside the existing incident fields for Test Case detail rendering.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/IncidentManagerPageHeader/useTestCaseIncidentHeader.test.tsx Covers resolved inline status, rejection of non-resolved inline status, and state clearing during navigation.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/DataQualityDashboard.spec.ts Verifies resolved-incident visibility and reopening while preserving the original incident state identifier.

Reviews (4): Last reviewed commit: "fix(test): wrap Data Observability locat..." | Re-trigger Greptile

@manerow
manerow requested a review from a team as a code owner July 24, 2026 10:44
@github-actions

github-actions Bot commented Jul 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 added backend safe to test Add this label to run secure Github workflows on PRs labels Jul 24, 2026
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 65%
65.66% (76646/116718) 49.49% (45895/92735) 50.75% (13872/27330)

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

🔴 Playwright Results — workflow failed

Validated commit bab0083908768ad833a24e2349d3b0ba4f033a36 in Playwright run 30106099622, attempt 1.

✅ 697 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 5 skipped · 🧰 0 lifecycle flaky

Pipeline and setup failures (7)

  • Playwright coverage validation found 40 missing, 0 unexpected, 0 duplicate-plan, and 0 duplicate-execution test ID(s).
  • Shard domain-isolation-01 did not upload a usable Playwright results artifact.
  • Shard ingestion-01 did not upload a usable Playwright results artifact.
  • Shard domain-isolation-01 failed during downloadDistribution setup.
  • Shard domain-isolation-01 test execution finished with status skipped without a reported test failure.
  • Shard ingestion-01 failed during downloadDistribution setup.
  • Shard ingestion-01 test execution finished with status skipped without a reported test failure.

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) 49m 32s

⏱️ Max setup 1m 56s · max shard execution 16m 24s · max shard-job elapsed before upload 19m 47s · reporting 4s

🌐 197.63 requests/attempt · 2.71 app boots/UI scenario · 25.81% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 25.81% (convergence target: at most 15%).
  • Application boot ratio was 2.71 per UI scenario (1947 boots / 718 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 107 0 0 0 0 0
✅ Shard chromium-02 97 0 0 0 0 0
✅ Shard chromium-03 101 0 0 0 0 0
✅ Shard chromium-04 138 0 0 3 0 0
✅ Shard chromium-05 128 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
⛔ Shard domain-isolation-01
✅ Shard global-state-01 23 0 0 0 0 0
⛔ Shard ingestion-01
✅ Shard reindex-01 5 0 0 0 0 0
✅ Shard search-01 10 0 0 0 0 0
✅ Shard search-rbac-01 27 0 0 2 0 0

📦 Download artifacts

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

@gitar-bot

gitar-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Restores in-place reopening of resolved DQ incidents on the Test Case page by integrating the inlined incidentStatus field. Addresses the redundant type cast finding during the review process.

✅ 1 resolved
Quality: Redundant type cast on already-typed incidentStatus

📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/IncidentManagerPageHeader/useTestCaseIncidentHeader.ts:251-253
testCaseData?.incidentStatus is already typed as TestCaseResolutionStatus | undefined in the generated TestCase type, so the as TestCaseResolutionStatus | undefined assertion is a no-op. It can be dropped to keep the type checker enforcing the field's real type rather than masking it with a cast.

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

@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reopen affordance lost on Test Case page and DQ tab after an incident is resolved (regression from #30182)

1 participant