Repository navigation
Fixes 29415: Show an empty state and the real line count in the topic config and search index settings tabs - #37120
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! |
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
|
| Count | Rule |
|---|---|
| 7 | react-hooks/exhaustive-deps |
| 2 | openmetadata-ui-patterns/deprecated-om-tokens |
| 2 | openmetadata-imports/no-circular-imports |
| 1 | openmetadata-imports/no-lower-layer-page-imports |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/Topic/TopicDetails/TopicDetails.component.tsx:276:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'onTopicUpdate' and 'topicDetails'. Either include them or remove the dependency array. If 'onTopicUpdate' chan |
| 🟡 | src/components/Topic/TopicDetails/TopicDetails.component.tsx:344:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array. |
| 🟡 | src/components/Topic/TopicDetails/TopicDetails.component.tsx:387:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'fetchActivityCount' and 'fetchTaskCounts'. Either include them or remove the dependency array. |
| 🟡 | src/components/Topic/TopicDetails/TopicDetails.component.tsx:455:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'customizedPage?.tabs', 'feedCount', 'getEntityFeedCount', and 't'. Either include them or remove the dependency ar |
| 🟡 | src/components/Topic/TopicDetails/TopicDetails.component.tsx:502:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'tabs'. Either include it or remove the dependency array. |
| 🟡 | src/components/Topic/TopicDetails/TopicDetails.component.tsx:502:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked. |
| 🟡 | src/components/common/QueryViewer/QueryViewer.component.tsx:58:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/common/QueryViewer/QueryViewer.component.tsx:74:21 |
openmetadata-ui-patterns/deprecated-om-tokens |
Legacy token "--om-legacy-color-eeeeee" is deprecated. Use tw: utilities or --tw-* theme variables. Migrate existing references when editing them; do not add ne |
| 🟡 | src/components/common/QueryViewer/QueryViewer.component.tsx:75:21 |
openmetadata-ui-patterns/deprecated-om-tokens |
Legacy token "--om-legacy-color-757575" is deprecated. Use tw: utilities or --tw-* theme variables. Migrate existing references when editing them; do not add ne |
| 🟡 | src/utils/SearchIndexUtils.tsx:27:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/SearchIndexUtils.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/utils/SearchIndexUtils.tsx:37:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed
|
…-config # Conflicts: # .github/playwright/timing-baseline.json
Code Review ✅ Approved🟡 Medium risk · The shared QueryViewer reformats displayed and copied values and adds empty states across several tabs, potentially changing content users expect to see. Fixes the empty state and line count in the topic Config and search index Search Index Settings tabs by formatting the JSON once in VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
…ix DQ, search index and incident-time fixtures (#37695) * test(playwright): refresh stale 2.1 visual baselines and fix the data quality and search index scenes The visual lane on 2.1 still failed 214 tests after #37656. 199 of the 200 mismatched baselines date from the original capture in #36640 and never ran in the run #37656 refreshed from, because 6 of 7 shards stopped at maxFailures. Each is replaced with the first-attempt actual from 2.1 run 43212731841. - visualData: the batch DQ fixture also answers value_count. #37507 switched the table total to value_count, the fixture returned no row, and DataAssetsCoveragePieChartWidget threw reading totalData[0], raising an error toast on the data quality page and its interaction scenes. - scenarios: the search index settings tab waits for its empty-state placeholder. #37120 removed the panel title the scene waited for; the fixture index has no settings. * test(playwright): pin the incident check time in the visual fixture The incident timestamp equalled FIXED_DATE while the browser clock keeps running, so the asset health widget rendered 'Last check N secs ago' with N depending on scene duration. It is now one hour earlier. * test(playwright): refresh the 2.1 baselines the fixture fixes changed Run 43264131527 renders the data quality and data observability scenes with the value_count fixture fix, the table manage menu, and an advanced-search nested-group frame that the previous run never reached. Each actual matched its retry. * test(playwright): refresh the 2.1 shard 02 baselines and nested group frames Run 43297316037 is the first 2.1 run where shard 02 ran its tests: dark announcements, bots, incident manager and advanced-search frames. Each actual matched its retry. The dark nested group-2 card is identical on main, where it was captured from run 43263784280; the earlier frames of that scene match pixel for pixel. * test(playwright): refresh the 2.1 dark nested-group footer frame The last advanced-search nested-group frame that earlier 2.1 runs never reached (run 43307968814). The actual matched its retry.



Describe your changes:
Fixes #29415
The topic Config tab and the search index Search Index Settings tab both render
QueryViewerwithJSON.stringify(config). Three defects followed from that:JSON.stringify(undefined)isundefined,QueryViewerhid the editor and showed nothing in its place: a card with only the title.QueryViewernow rendersNoDataPlaceholderwhenever there is nothing to show, and the two callers pass''for an empty config — including{}, which Kafka ingestion can store (common_broker_source.pysetstopic_config = {}), via a newgetJSONEditorValueutil.SchemaEditorpretty-printed it to 14+ lines.QueryViewernow formats once withgetSchemaEditorValueand uses that value for the badge, the copy button (previously copied the minified JSON) and the editor height class;SchemaEditorgetsautoFormat={false}so the text is not formatted twice.titleequal to the tab label ("Config" under the "Config" tab) since fix(ui): login page update #12213 / feat(ui): added search index details page changes #13104. The title is dropped there; the dbt tab keeps its project/path title. With no title, the line badge and copy button now sit at the right of the header (justify-end), as they did with antd'sCard extrabefore the coreCardmigration (fix(ui): entity details pages dark mode (page-by-page) #33987) — this also fixes the View Definition tab.Other
QueryViewercallers affected by the new empty state, by design:Table.spec.ts)inspectionQueryschemaDefinitionis''MostExpensiveQueriesWidgetexpanded rows with an empty queryCollate companion: open-metadata/openmetadata-collate#8291 drops the same duplicate title from the AI-mode
TopicConfigTab.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
topicConfig: {}→ Config tab shows "No data available."Unit tests
QueryViewer.test.tsx: line count and editor value use the formatted JSON, copy gets the formatted JSON, empty query renders the placeholder (with and without a title)SchemaEditor.utils.test.ts:getJSONEditorValuefor a non-empty object,{}andundefinednpx jest src/utils/SchemaEditor.utils src/components/common/QueryViewer src/components/Topic/TopicDetails src/utils/SearchIndexUtils src/pages/SearchIndexDetailsPage src/components/DataQuality/IncidentManager/SqlQueryTab→ all passed (see Verification)Backend integration tests
make java_affected: "No Java tests are impacted by this change."Playwright (UI) tests
playwright/e2e/Features/EntityConfigTabs.spec.ts(4 tests) + timing-baseline entriesTable.spec.tsdbt seed tests now assert the empty stateQueryViewer/**,Topic/TopicDetails/**,SearchIndexUtils.tsxinimpact-map.json; regeneratedimpact-map.generated.jsonPlanner:
make playwright_affected→ 25 specs (1 changed, 3 impact-mapped, 21 canaries because.github/playwright/*changed). Targeted run at the final commit (1dc15201b48, OSS UI on Vite :3101 → local backend :8585,--workers=2 --retries=0): 13/13 passed (HTML report screenshot below).Features/EntityConfigTabs.spec.ts(new)Features/Topic.spec.tsFeatures/DataQuality/IncidentManagerSqlQuery.spec.tsFeatures/Table.spec.ts› dbt seed (path only)Features/Table.spec.ts› dbt seed (source project only)Not attributable to this change, and not control-verified: the run aborted when the host disk filled (
ENOSPC), which also took down the local Docker backend before anorigin/maincontrol could run.Entity.spec.ts"Domain Add, Update and Remove" (all entity types, 3m timeouts): the local backend has no working Explore/domain search.SearchRelevance.spec.ts(search-nightly): needs the sample-data relevance fixtures.HealthCheck.spec.ts: needs an ingestion orchestrator.SearchSettings.spec.ts(3) andTable.spec.tspagination / expand-collapse / search-consistency (7),Dashboards.spec.ts:189: none of these renderQueryViewer.0ms: aborted byENOSPC.The merge queue runs the full suite.
Manual testing performed
VITE_DEV_SERVER_TARGET=http://localhost:8585/)Verification
EntityConfigTabs.spec.tson origin/main UI code → 4/4 fail ("1 Line" vs 5/10 lines, no placeholder); on this branch → 4/4 passEntityConfigTabs.spec.ts --repeat-each=10 --workers=4→ 40/40 passedSchemaEditor.utils,QueryViewer,TopicDetails,SearchIndexUtils,SearchIndexDetailsPage,SqlQueryTab→ 7 suites, 44/44 passedyarn ui-checkstyle:changed+yarn ui-checkstyle:playwright:changed→ 0 errors, tree clean;yarn lint:playwright→ 0 errors;yarn test:eslint-rules→ 189 pass / 0 fail;generate_playwright_impact_map.py --check→ up to datenpx tsc --noEmit→ 1 error, pre-existing on origin/main (CustomPropertiesDetailPage.tsxisLoading), none in changed filesREVIEW.md, two passes, last on1c75bbeb58d): no 🔴. Nits fixed:{}config treated as empty (getJSONEditorValue+ Playwright{}case), editor no longer formats twice (autoFormat={false}), dbt-seed tests assert the empty state, impact map committed, timing-baseline entry re-keyed for the renamed test. Answered: CollateTopicConfigTabtitle is out of scope for an OSS PR (follow-up noted above).UI screen recording:
Not applicable — bug fix to existing tabs, no new feature flow. Before/after screenshot (all four states in one image):
Playwright HTML report:
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.🤖 Generated with Claude Code