Fixes #32658: glossary single-select editor shows display name, not raw FQN - #32726
detail-app[bot] wants to merge 10 commits into
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 failedValidated commit ✅ 4476 passed · ❌ 3 failed · 🟡 11 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky ❌ Action needed: test(s) failed on every attempt against this PR’s validated commit — see Genuine Failures below. These are test failures, not CI budget or infrastructure issues. 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) 1h 47m 35s ⏱️ Max setup 5m 3s · max shard execution 21m 0s · max shard-job elapsed before upload 24m 34s · reporting 26s 🌐 218.13 requests/attempt · 2.31 app boots/UI scenario · 33.25% common-shard skew Optimization targets still in progress:
Genuine Failures (failed on all attempts)❌
|
…h developer handbook - Add domain tags (@Features, @Governance) to test.describe - Move entity setup to test.beforeAll and cleanup to test.afterAll - Add test.step() for logical grouping within each test - Use authenticateAdminPage for consistent auth pattern - Use test.slow() instead of test.slow(true) - Reset entity rules in afterAll to avoid state leaking Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… spec Fixes the UI checkstyle CI failure — prettier reformats the test.beforeAll callback indentation and collapses single-line ternaries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…elect-editor-shows-di-9fe988
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated 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 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 |
|
| Count | Rule |
|---|---|
| 4 | openmetadata-imports/no-circular-imports |
| 1 | react-hooks/exhaustive-deps |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/common/AsyncSelectList/TreeAsyncSelectList.tsx:57: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/components/common/AsyncSelectList/TreeAsyncSelectList.tsx:62: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/components/common/AsyncSelectList/TreeAsyncSelectList.tsx:63: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/components/common/AsyncSelectList/TreeAsyncSelectList.tsx:66: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/components/common/AsyncSelectList/TreeAsyncSelectList.tsx:296:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchGlossaryListInternal'. Either include it or remove the dependency array. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed…elect-editor-shows-di-9fe988
…elect-editor-shows-di-9fe988
The beforeAll was enabling ALL entity rules (DATA_ASSET_RULES defaults are all enabled: true), and the afterAll was "resetting" them to the same enabled state. This poisoned the server-side entityRulesSettings for subsequent tests in chromium-11 — the Domain Add/Update/Remove and TeamAssetsRightPanel glossary tests timed out because Data Product Domain Validation and single-selection rules were unexpectedly active. Fix: beforeAll now enables ONLY the single-glossary-term rule we need; afterAll disables all rules to restore default state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
|
Already addressed here - #33059 |



Detail bug report: View on Detail
Describe your changes:
Fixes #32658
I worked on the glossary term editor in single-select mode (reached when the admin-enabled
SINGLE_GLOSSARY_TERM_FOR_TABLEData Asset Rule applies to Tables) because, on a Table that already has one glossary term assigned, the editor opened showing the raw fully-qualified name (e.g.Glossary.term1) instead of the friendly display name (Term 1), and antd logged a dev-modeWarning: \value` should not be array when `TreeSelect` is single mode` warning.Root cause:
TagsSelectFormalways setForm'sinitialValues.tagstodefaultValue(astring[]), even in single-select mode, so the antdForm.Iteminjected an arrayvalueinto a single-selectTreeSelect— producing the rc-tree-select warning.TreeSelectrenders via antd'sSingleSelector, whose label is resolved fromtreeData'svalueEntities. ButtreeDatais built fromgetGlossariesList, which returns only glossary roots (the term children are lazily loaded on expand). So the assigned leaf was missing on first render and the selector fell back to the verbatim FQN — persisting for the whole session until the user expanded the parent glossary or searched for the term.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
SINGLE_GLOSSARY_TERM_FOR_TABLEenabled, shows the friendly display name immediately (no expand/search needed) and emits no array-value warning.TagsV1chip and the save path is unaffected.Unit tests
openmetadata-ui/src/main/resources/ui/src/components/common/AsyncSelectList/TreeAsyncSelectList.singleselect.test.tsx— new jest spec mounting the realTreeAsyncSelectListthroughTagsSelectFormexactly as production does, withgetGlossariesListmocked to return only a glossary root (the production lazy-load precondition) and a faithful inline reimplementation ofconvertGlossaryTermsToTreeOptions(avoiding loadingGlossaryUtils.tsx, whose module-levellazy()imports hang the jsdom renderer). Three cases: single-select shows friendly name + zero array warnings; empty single-select shows no value + zero warnings; multi-select still renders the chip. The single-select case is verified to fail against the unpatched source (Expected: "Term 1", Received: "Glossary.term1"+ 2× array-value warnings), so the test is a genuine regression guard.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
openmetadata-ui/.../ui/playwright/for UI changes.openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/GlossarySingleSelectDisplay.spec.ts— enablesSINGLE_GLOSSARY_TERM_FOR_TABLEvia the settings API, creates a glossary + term + table, assigns the term via JSON-Patch, opens the editor, and asserts the editor's selection-item shows the friendlydisplayName(not the raw FQN) and that novalue should not be array when ...warning is emitted. A second test case covers the empty single-select path (no assigned term, opens via theadd-tagcontrol, asserts no selection and no warning).Manual testing performed
postgres:15andopensearchproject/opensearch:3.4.0, started them with a compose override supplyingPOSTGRES_USER/PASSWORD/DBand host port mappings; built the full OpenMetadata distribution withmvn -pl openmetadata-dist -am -DskipTests install; ran DB migrations via./bootstrap/openmetadata-ops.sh migrate; started the server detached and waited for/api/v1/system/healthto return 200; reset the admin password viareset-password. (The default 2 GB heap OOMstsc:checkon this project — 8 GB is required, andNODE_OPTIONS='--max-old-space-size=8192'was used.)setupandbundle-smokeprojects to populateplaywright/.auth/admin.jsonand confirm the built app mounts with no bootstrap errors.DataAssetRulesEnabledTable test (the existing spec exercisingSINGLE_GLOSSARY_TERM_FOR_TABLEwithassignGlossaryTermon Tables, lines 198-221 ofDataAssetRulesEnabled.spec.ts) — passed.DataAssetRulesDisabledTable test (multi-select save path:assignGlossaryTermAdd-then-Edit on Tables, lines 270-281 ofDataAssetRulesDisabled.spec.ts) — passed (33/33 in the disabled/enabled dependency chain).GlossarySingleSelectDisplay.spec.ts— both test cases passed.yarn test --testPathPattern="(AsyncSelectList/TreeAsyncSelectList|TagsSelectForm)"(8/8),yarn tsc:check(0 errors referencing the changed files; the ~604 baseline errors are all in unrelated files), and the ui-checkstyle sequence (organize-imports → eslint → prettier → license) on the changed files (0 new errors, 0 new warnings; the 6 warnings onTreeAsyncSelectList.tsxare line-for-line the pre-existing baseline).UI screen recording / screenshots:
Not applicable — the visible change is purely a label swap inside an existing dropdown (raw FQN → friendly name) that requires a specific admin-gated rule to surface, for which a screen recording adds little over the E2E test coverage. The new Playwright spec asserts the exact text rendered in the selection-item.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Automatic Fixes PRs can be configured here.