Skip to content

Fixes #32672: show error placeholder on Topic page for sustained fetch failures - #32736

Merged
Rohit0301 merged 4 commits into
mainfrom
detail/bug-fix/fixes-32672-show-error-placeholder-on-topic-page-f-0187b8
Sep 10, 2026
Merged

Rohit0301 merged 4 commits into
mainfrom
detail/bug-fix/fixes-32672-show-error-placeholder-on-topic-page-f-0187b8

Conversation

@detail-app

@detail-app detail-app Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Detail bug report: View on Detail

Fixes #32672

I worked on the Topic details page rendering an infinite <PageLoader /> spinner after the Topic fetch fails sustainedly (backend returning 5xx, or backend unreachable), because the page only treated an HTTP 404 as an error state. Non-404 errors fell through to a if (!topicDetails) return <PageLoader /> guard with no refetch trigger, so the page spun indefinitely — and transport failures (no response.status) spun with no toast at all.

Type of change:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Topic fetch returns 404 → entity-missing placeholder with the existing "Topic instance for … not found" message naming the FQN; no toast; no loader.
  • Topic fetch fails sustainedly with a 5xx → generic fetch-error placeholder; a toast fires once; no spinning loader.
  • Topic fetch fails with a transport error (no response.status — e.g. blocked request / DNS / connection refused) → fetch-error placeholder and a toast (previously the loader spun with no toast at all).

Unit tests

  • I added unit tests for the new/changed logic.
  • Files updated: openmetadata-ui/src/main/resources/ui/src/pages/TopicDetails/TopicDetailsPage.test.tsx (3 new tests for 404, sustained 5xx, and transport-error/no-status). The happy path remains covered by the pre-existing should render properly test, and the sibling src/components/Topic/** suite (15 tests) still passes.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable (no committed Playwright changes).
    • I verified the fix end-to-end with a throwaway Playwright route-interception spec (force 503 / abort / 404 on GET /api/v1/topics/**, assert the placeholder renders and the loader is gone). It passed with the fix and reproduced the stuck-loader on the un-fixed baseline. I did not commit it because its inline UI login conflicts with the chromium project's pre-set auth storageState; a CI-safe variant reusing the admin storage state is a follow-up.
    • The existing playwright/e2e/Features/Topic.spec.ts happy-path suite (schema tab, field deep links) re-ran green against the fixed UI (7/7), so no happy-path regression.

Manual testing performed

  1. Brought up a full local stack: stock postgres:15 + opensearchproject/opensearch:3.4.0 containers, ran Flyway via the locally-built openmetadata-service jar, started the Vite dev server on :3000 proxying /api to the backend on :8585 (serving the UI with the fix from source).
  2. Headless browser (Playwright Chromium) login as admin, then for each failure class forced GET /api/v1/topics/{fqn} to 503 / abort / 404 via page.route and navigated to /topic/sample_kafka.sales.
  3. Verified: 5xx and transport failures render [data-testid="no-data-placeholder"] (not [data-testid="loader"]); 404 renders the entity-missing placeholder with the FQN named. Reverting the component to baseline reproduced the infinite loader for the 5xx case (30s timeout, no placeholder), confirming the test catches the bug.

The literal DevTools "Block request URL" walk-through from the report was not performed in an interactive browser (not possible in this headless environment); the route-interception run above asserts the same rendered-DOM conditions and is the automated equivalent.

Routine checks — UI unit tests, ESLint + Prettier + organize-imports (yarn ui-checkstyle:changed), and tsc --noEmit — all pass on the changed files (0 new errors/warnings; 0 type errors in the changed files).

UI screen recording / screenshots:

Not applicable. The change only swaps an indefinite spinner for the existing error placeholder on a failed fetch; no new UI surface is introduced. A screen recording could not be produced in this headless environment; the visual change is described above (loader → no-data-placeholder on 5xx/transport failure; 404 keeps its existing entity-missing message).

Checklist:

  • I have read the CONTRIBUTING document.

  • My PR title is Fixes <issue-number>: <short explanation>

  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.

  • I have commented on my code, particularly in hard-to-understand areas.

  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

  • For UI changes: I attached a screen recording and/or screenshots above.

  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

  • I have added a test that covers the exact scenario we are fixing. For complex issues, comment the issue number in the test for future reference.

Scope note

The sibling pages DashboardDetailsPage, ChartDetailsPage, MetricDetailsPage, and PipelineDetailsPage share the same 404-only isError + toast-guard pattern and have the same latent defect. They are intentionally left untouched here per the report's scope; each would need its own fix + tests.


Automatic Fixes PRs can be configured here.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit ac69d10021c61fec21e16c3eb8a4e2b035f2aa7b in Playwright run 34462303863, attempt 1.

✅ 4492 passed · ❌ 0 failed · 🟡 11 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky

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) 54m 40s

⏱️ Max setup 4m 58s · max shard execution 20m 16s · max shard-job elapsed before upload 23m 26s · reporting 22s

🌐 218.41 requests/attempt · 2.30 app boots/UI scenario · 35.20% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 35.2% (convergence target: at most 15%).
  • Browser traffic was 218.41 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.3 per UI scenario (10976 boots / 4762 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard advanced-search-01 130 0 0 0 0 0
✅ Shard chromium-01 151 0 0 0 0 0
🟡 Shard chromium-02 139 0 1 0 0 0
✅ Shard chromium-03 154 0 0 1 0 0
🟡 Shard chromium-04 147 0 2 0 0 0
✅ Shard chromium-05 157 0 0 0 0 0
✅ Shard chromium-06 158 0 0 0 0 0
🟡 Shard chromium-07 179 0 1 0 0 0
✅ Shard chromium-08 161 0 0 0 0 0
✅ Shard chromium-09 146 0 0 0 0 0
✅ Shard chromium-10 155 0 0 0 0 0
🟡 Shard chromium-11 143 0 1 0 0 0
✅ Shard chromium-12 146 0 0 0 0 0
🟡 Shard chromium-13 158 0 1 0 0 0
✅ Shard chromium-14 150 0 0 0 0 0
🟡 Shard chromium-15 154 0 1 0 0 0
🟡 Shard chromium-16 173 0 1 0 0 0
✅ Shard chromium-17 144 0 0 0 0 0
✅ Shard chromium-18 169 0 0 0 0 0
✅ Shard chromium-19 172 0 0 0 0 0
✅ Shard chromium-20 158 0 0 0 0 0
🟡 Shard chromium-21 176 0 1 0 0 0
🟡 Shard chromium-22 170 0 1 0 0 0
✅ Shard chromium-23 125 0 0 0 0 0
🟡 Shard chromium-24 177 0 1 0 0 0
✅ Shard chromium-25 171 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard import-export-01 44 0 0 0 0 0
✅ Shard import-export-02 106 0 0 0 0 0
✅ Shard ingestion-01 46 0 0 0 0 0
✅ Shard ingestion-02 49 0 0 0 0 0
✅ Shard reindex-01 28 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 11 flaky test(s) (passed on retry)
  • Pages/Domains.spec.ts › Create DataProducts and add remove assets (shard chromium-02, 1 retry)
  • Features/Glossary/GlossaryCRUDOperations.spec.ts › should create glossary with mutually exclusive enabled (shard chromium-04, 1 retry)
  • Pages/ExploreBrowse.spec.ts › Glossary leaf under Governance filters the results (shard chromium-04, 1 retry)
  • Features/ContextCenterMemories.spec.ts › switching back to Edit tab restores the textarea (shard chromium-07, 1 retry)
  • Pages/TasksUIFlow.spec.ts › Create and reject tag task for Dashboard via UI (shard chromium-11, 1 retry)
  • Pages/UserDetails.spec.ts › Create team with domain and verify visibility of inherited domain in user profile after team removal (shard chromium-13, 1 retry)
  • Features/DataQuality/TableLevelTests.spec.ts › Custom SQL Query (shard chromium-15, 1 retry)
  • Pages/EntityDataConsumer.spec.ts › Tier Add, Update and Remove (shard chromium-16, 1 retry)
  • Features/Announcements/AnnouncementEntity.spec.ts › edits an existing announcement on a domain (shard chromium-21, 1 retry)
  • Features/ColumnBulkOperations.spec.ts › should select column, open drawer, and verify form fields (shard chromium-22, 1 retry)
  • Pages/DescriptionVisibility.spec.ts › Customized Table detail page Description widget shows long description (shard chromium-24, 1 retry)

📦 Download artifacts

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

@detail-app detail-app Bot added the safe to test Add this label to run secure Github workflows on PRs label Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 1 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 1 warning(s) across 1 changed file(s).

Count Rule
1 react-hooks/exhaustive-deps
All findings
Location Rule Message
🟡 src/pages/TopicDetails/TopicDetailsPage.component.tsx:339:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'fetchResourcePermission'. Either include it or remove the dependency array.

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 70%
70.63% (95771/135579) 55.23% (56779/102796) 56.58% (18936/33464)

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 758 → 758
- 0 added, 0 removed, 13 changed spec-list

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/constant/config.ts
  openmetadata-ui/src/main/resources/ui/playwright/constant/service.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/service/DashboardServiceClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/service/DatabaseServiceClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/service/MessagingServiceClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/fixtures/base.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/service.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts
  … and 3 more

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

@Rohit0301
Rohit0301 enabled auto-merge September 10, 2026 09:45
@sonarqubecloud

Copy link
Copy Markdown

@Rohit0301
Rohit0301 added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit bbc8f13 Sep 10, 2026
133 checks passed
@Rohit0301
Rohit0301 deleted the detail/bug-fix/fixes-32672-show-error-placeholder-on-topic-page-f-0187b8 branch September 10, 2026 16:24
Rohit0301 added a commit that referenced this pull request Sep 11, 2026
* Fixes #32672: show error placeholder on Topic page for sustained fetch failures (#32736)

* Fixes #32672: show error placeholder on Topic page for sustained fetch failures

* chore(playwright): auto-refresh impact-map.generated.json [skip ci]

---------

Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com>
Co-authored-by: Karan Hotchandani <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rohit Jain <[email protected]>

* Fixes #32632: reset Impact Analysis pagination to page 1 on search/quick-filter change (#32699)

* fix(ui): reset Impact Analysis pagination to page 1 on search/quick-filter change

* test(ui): add Playwright pagination-reset tests for Impact Analysis (#32632)

Add two E2E tests to Pagination.spec.ts that guard the fix introduced in
change):

- "should reset Impact Analysis table pagination to page 1 on search change"
- "should reset Impact Analysis table pagination to page 1 on quick filter
  change"

Both tests create 16 downstream TableClass entities (exceeding PAGE_SIZE_BASE=15)
so two pages are reachable via ?pageSize=15 in the URL. Each test navigates to
page 2, then triggers the filter/search, and asserts the page-indicator resets
to "1 of X".

Also adds skipUrlParamCheck option to testCompletePaginationWithSearch utility
for callers where search state lives in component state rather than the URL.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* lint fix

* chore(playwright): auto-refresh impact-map.generated.json [skip ci]

---------

Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com>
Co-authored-by: Rohit0301 <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Rohit Jain <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chirag Madlani <[email protected]>

* fix(ui): reset TierCard selectedTier on close to prevent stale radio state (#33115)

* fix(ui): reset TierCard selectedTier on close to prevent stale radio state

Two bugs caused the tier radio button to show stale state:
- Bug A: cancelling a tier change left the cancelled tier selected on reopen
- Bug B: after a successful save, the old tier was shown on reopen because
  handleOpenChange closed over a stale currentTier before React propagated
  the updated prop

Fix: extract handleOpenChange to reset selectedTier to currentTier on every
close, and add a useEffect([currentTier]) guard that re-syncs when the prop
updates while the popover is closed (covers the save-stale race).

Adds unit tests (TierWidget.test.tsx) and a Playwright E2E spec
(TierWidget.spec.ts) covering both scenarios.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* chore(playwright): auto-refresh impact-map.generated.json [skip ci]

* minor fix

* chore(ui): fix formatting in TierWidget spec and test files

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix(ui): track TierCard open state internally to guard currentTier re-sync

The useEffect that re-syncs selectedTier on currentTier change was guarding
with !popoverProps?.open, but uncontrolled usages (no popoverProps) have
open === undefined (always falsy), so the reset fired mid-edit, silently
discarding the user's in-progress selection.

Fix: add isOpen state updated in handleOpenChange so the guard works for
both controlled and uncontrolled usages. Also adds isOpen to the useEffect
dependency array to satisfy react-hooks/exhaustive-deps.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* chore(ui): move TableClass init into beforeAll and clarify onOpenChange override

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fixes #32677: preserve user data in table-type custom property editor when a column is named 'id' (#32741)

* Fixes #32677: preserve user data in table-type custom property editor when a column is named 'id'

* Remove backend reserved-column validation; keep FE __row_id__ guard only

The frontend row-id key rename (id -> __row_id__ in EditTableTypePropertyModal)
already fixes the data loss on its own, and __row_id__ is never persisted. The
backend reserved-name check added the wrong guarantee at the wrong layer: it
rejected `id` -- a legitimate, previously-valid column name -- at the API, and
hard-coded a frontend grid sentinel into backend validation.

- Revert TypeRepository.validateTableTypeConfig reserved-name rejection and its
  RESERVED_TABLE_COLUMN_NAMES constant.
- Remove the three TypeResourceIT tests (and now-unused imports/fixtures) that
  only exercised that backend validation.
- Scope the AddCustomProperty form guard to the frontend's own sentinel
  `__row_id__` (drop `id`), so the form no longer bans a valid column name.

* chore(playwright): auto-refresh impact-map.generated.json [skip ci]

* chore(playwright): auto-refresh impact-map.generated.json [skip ci]

* i18n: translate reserved-column-name into all non-English locales

yarn i18n stamped the English string verbatim into every locale for
message.reserved-column-name; replace those placeholders with real
translations (19 non-en locales), preserving the {{name}} interpolation.

---------

Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com>
Co-authored-by: sonika-shah <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Karan Hotchandani <[email protected]>

* chore(playwright): auto-refresh impact-map.generated.json

* fix(backport): use @playwright/test in TierWidget.spec.ts (base.ts absent in 2.0)

support/fixtures/base.ts was introduced in main after the 2.0 branch cut.
Swap the import to @playwright/test so Playwright can resolve the module
during test discovery on this branch.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com>
Co-authored-by: Karan Hotchandani <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Chirag Madlani <[email protected]>
Co-authored-by: sonika-shah <[email protected]>

This branch was previously deployed

1 inactive deployment
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Detail Bug] Topic details page can get stuck on infinite loading spinner after sustained fetch errors

4 participants