Fixes #32692: render last-run banner on observability test-case Results tab - #32754
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
✅ Playwright Results — workflow succeededValidated commit ✅ 557 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking 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) 36m 14s ⏱️ Max setup 4m 56s · max shard execution 18m 46s · max shard-job elapsed before upload 22m 26s · reporting 5s 🌐 234.59 requests/attempt · 2.82 app boots/UI scenario · 12.88% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
|
| Count | Rule |
|---|---|
| 4 | openmetadata-imports/no-lower-layer-page-imports |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/observability/TestCaseDetail/TestCaseDetail.tsx:33:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/TestCaseDetail/TestCaseDetail.tsx:34:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/TestCaseDetail/TestCaseDetail.tsx:35:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/observability/TestCaseDetail/TestCaseDetail.tsx:40:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed…anner-on-observabilit-3b926d
|



Detail bug report: View on Detail
Summary
TestCaseDetail.tsxis the observability (AI app-mode) test-case detail renderer, registered for/observability/test-case/:fqnand/observability/test-case/:fqn/:tabinobservability.module.tsx:210,219. It shares the sameuseTestCaseDetailPagehook and the sameuseTestCaseIncidentHeaderhook as the legacyIncidentManagerDetailPage(registered for/test-case/:fqn).TestCaseDetail.tsxnever rendersTestCaseLastRunBanneron the Results tab and never fetches thenextRunTimestampvalue that the banner displays. The two renderers that share a hook, a header (IncidentManagerPageHeader), auseTestCaseIncidentHeadercall, and a tab strip therefore present different content for the same data:/test-case/:fqnshows the last-run/next-run/incident-task banner above the results tab;/observability/test-case/:fqnshows only the bare results<Tab />./observability/test-case/:fqnwith Results active, the banner containerdata-testid="test-case-last-run-banner-tab-container"is absent. Expected: observability renderer should match legacy/test-case/:fqnand showTestCaseLastRunBannerabove the Results tab, includingnextRunTimestamp./observability/test-case/<fqn>in AI app-mode; the first tab interaction routes to the legacy/test-case/<fqn>/<tab>renderer (which shows the banner), so the missing banner is visible for one initial render.Code with Bug
openmetadata-ui/src/main/resources/ui/src/components/observability/TestCaseDetail/TestCaseDetail.tsxLegacy renderer behavior for the same Results tab (shows banner above
<Tab />):openmetadata-ui/src/main/resources/ui/src/pages/IncidentManager/IncidentManagerDetailPage/IncidentManagerDetailPage.tsxExplanation
TestCaseDetail.tsxrenders the current tab body (<Tab />) directly and does not include the sibling JSX block that conditionally rendersTestCaseLastRunBannerfor the Results tab.nextRunTimestamp, which the legacy page fetches via auseQuery(fetchNextTestCaseRunTimestamp/TEST_CASE_NEXT_RUN_QUERY_KEY/shouldFetchNextRun). The observability tree has no references to these helpers and therefore never fetches the timestamp, making it impossible to display the banner.getTestCaseDetailPagePathtoROUTES.TEST_CASE_DETAILS_WITH_TAB(/test-case/:fqn/:tab), so normal click-flows land on the legacy page; only deep-linking to/observability/test-case/:fqnin AI app-mode reveals the missing banner, and the first tab interaction reroutes to legacy, making the issue transient.Recommended Fix
Mirror the legacy page’s Results-tab wrapper in
components/observability/TestCaseDetail/TestCaseDetail.tsx: add thenextRunTimestampquery and conditionally renderTestCaseLastRunBannerabove the Results tab<Tab />, using the same imports and dependency discipline asIncidentManagerDetailPage.tsx.History
This bug was introduced in commit 2807684. PR #31911 created
components/observability/TestCaseDetail/TestCaseDetail.tsxas a new observability-shell parallel ofIncidentManagerDetailPage.tsxbut omitted theTestCaseLastRunBannerJSX block and itsnextRunTimestampquery that already existed in the legacy file.Automatic Fixes PRs can be configured here.