Skip to content

feat(ui): migrate facade imports to direct sources + delete EntityUtils.tsx - #28919

Merged
shah-harshit merged 5 commits into
mainfrom
feat/consumer-migration-and-facade-cleanup
Jun 10, 2026
Merged

shah-harshit merged 5 commits into
mainfrom
feat/consumer-migration-and-facade-cleanup

Conversation

@shah-harshit

Copy link
Copy Markdown
Contributor

Summary

Completes the import migration for the EntityUtils code-split initiative. All consumer files now import directly from the canonical source module instead of going through backward-compat re-export facades. The facades are then cleaned up.

Consumer migrations (~273 files)

Facade (old import) Direct source (new import)
EntityUtils EntityNameUtils, EntityPureUtils, EntityPermissionUtils, EntityReferenceUtils, EntitySearchUtils, EntitySortUtils, EntityTagUtils, EntityVoteUtils, EntityBreadcrumbUtils, EntityDataBreadcrumbUtils, EntityLinkUtils, EntityColumnUtils
EntityPureUtils re-exports Same final sources as above
TableUtils re-exports TablePureUtils, TableDropdownOptions, TableTabsUtils
ServiceInsightsTabUtils re-exports ServiceInsightsTabPureUtils, ServiceInsightsWidgets
CustomizePageUtils re-export CustomizePagePureUtils
Database/Database.util re-exports DatabaseDropdownOptions, DatabaseTabsUtils
DatabaseSchemaDetailsUtils re-exports DatabaseSchemaDropdownOptions, DatabaseSchemaTabsUtils
DatabaseServiceUtils re-export DatabaseServicePureUtils

Facade cleanup

  • Deleted utils/EntityUtils.tsx — was entirely re-exports with no native code
  • Removed re-export blocks from 7 other facade files (EntityPureUtils.ts, TableUtils.tsx, ServiceInsightsTabUtils.tsx, CustomizePageUtils.ts, Database.util.tsx, DatabaseSchemaDetailsUtils.tsx, DatabaseServiceUtils.tsx)

Native functions in each facade file remain untouched.

Why this matters

These re-export facades were the backward-compat shim added in PRs #1–13 (the split PRs). Now that all consumers in both OSS and Collate repos point to the final source, the facades have no reason to exist. Removing them eliminates the indirection layer and makes the import graph clean and direct.

Test plan

  • yarn lint passes
  • yarn test passes (no test files were modified)
  • TypeScript: npx tsc --noEmit passes
  • Spot-check a few migrated files to confirm import paths resolve

🤖 Generated with Claude Code

… remove facades (PR #19/#20/#23)

Update ~273 consumer files to import symbols directly from their
canonical source modules. Remove all re-export boilerplate from
backward-compat facade files now that consumers are fully migrated.

## Consumer migrations

- EntityUtils → EntityNameUtils, EntityBreadcrumbPureUtils, EntityLinkUtils,
  EntityBreadcrumbUtils, EntityColumnUtils, EntityDataBreadcrumbUtils,
  EntityPureUtils, EntityPermissionUtils, EntityReferenceUtils,
  EntitySearchUtils, EntitySortUtils, EntityTagUtils, EntityVoteUtils
- EntityPureUtils → EntityPermissionUtils, EntityReferenceUtils,
  EntitySearchUtils, EntitySortUtils, EntityTagUtils, EntityVoteUtils
- TableUtils → TablePureUtils, TableDropdownOptions, TableTabsUtils
- ServiceInsightsTabUtils → ServiceInsightsTabPureUtils, ServiceInsightsWidgets
- CustomizePageUtils → CustomizePagePureUtils
- Database.util → DatabaseDropdownOptions, DatabaseTabsUtils
- DatabaseSchemaDetailsUtils → DatabaseSchemaDropdownOptions, DatabaseSchemaTabsUtils
- DatabaseServiceUtils → DatabaseServicePureUtils

## Facade cleanup

- Delete EntityUtils.tsx (was entirely re-exports; no native code remained)
- Remove re-export blocks from EntityPureUtils.ts, TableUtils.tsx,
  ServiceInsightsTabUtils.tsx, CustomizePageUtils.ts, Database.util.tsx,
  DatabaseSchemaDetailsUtils.tsx, DatabaseServiceUtils.tsx

Native functions in each file (getEntityFeedLink, updateNodeType,
ENTITY_LINK_SEPARATOR, getEntityIcon, getFormattedTotalAssetsDataFromSocketData,
etc.) remain unchanged.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@shah-harshit
shah-harshit requested a review from a team as a code owner June 10, 2026 11:28
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions

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 Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (12 flaky)

✅ 4272 passed · ❌ 0 failed · 🟡 12 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 299 0 2 4
🟡 Shard 2 802 0 4 9
🟡 Shard 3 807 0 1 8
✅ Shard 4 843 0 0 12
🟡 Shard 5 719 0 2 47
🟡 Shard 6 802 0 3 8
🟡 12 flaky test(s) (passed on retry)
  • Pages/SearchSettings.spec.ts › Preview config reflects reverted n-gram weight after save (shard 1, 1 retry)
  • Flow/SearchRBAC.spec.ts › User without permission (shard 1, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › Admin: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/DataQuality/TestCaseResultPermissions.spec.ts › User with only VIEW cannot PATCH results (shard 2, 1 retry)
  • Features/Glossary/GlossaryRemoveOperations.spec.ts › should add and remove reviewer from glossary (shard 2, 1 retry)
  • Features/Glossary/MUIGlossaryMutualExclusivity.spec.ts › MUI-ME-R02: Children of non-ME parent should render Checkboxes (shard 2, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Pages/EntityDataSteward.spec.ts › User as Owner Add, Update and Remove (shard 5, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Column dropdown drag-and-drop functionality for Glossary Terms table (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/TestSuite.spec.ts › Logical TestSuite (shard 6, 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

@shah-harshit shah-harshit changed the title feat(ui): migrate facade imports to direct sources + delete EntityUtils.tsx (PR #19/#20/#23) feat(ui): migrate facade imports to direct sources + delete EntityUtils.tsx Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.76% (67212/107085) 43.95% (37049/84289) 46.09% (11298/24508)

@sonarqubecloud

Copy link
Copy Markdown

@shah-harshit
shah-harshit enabled auto-merge (squash) June 10, 2026 18:37
@shah-harshit
shah-harshit merged commit 4141e69 into main Jun 10, 2026
52 checks passed
@shah-harshit
shah-harshit deleted the feat/consumer-migration-and-facade-cleanup branch June 10, 2026 19:15
@gitar-bot

gitar-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Migrates 273 consumer files to direct source imports and removes redundant facade utility files to eliminate the import indirection layer. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

shah-harshit added a commit that referenced this pull request Jun 10, 2026
Resolved import conflicts from consumer-migration PR (#28919) —
kept direct-source imports and lazy-load patterns from this branch.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
harshach added a commit that referenced this pull request Jun 15, 2026
Conflict resolutions:
- SearchResource.java: kept both imports (CSVExportResponse for the search
  export job pipeline + main's ReindexingUtil).
- ExploreV1.component.tsx: kept the CSV-jobs tray imports (CsvJobsTray,
  CSV_JOBS_REFRESH_EVENT, showSuccessToast) alongside main's
  withSuspenseFallback.
- CSVUtilsClassBase.tsx: kept the ExtensionData* interface imports and the
  rich-grid react hooks, adopted main's lazy-loaded ModalWithMarkdownEditor
  (dropped the redundant duplicate the auto-merge left near the class).
- 18 locale files: unioned both sides' new keys, then `yarn i18n` resynced
  all locales (incl. main's new sv-se.json) against en-us.json.

Post-merge fixes for cleanly-merged-but-broken imports (main deleted
EntityUtils.tsx in #28919 and split CommonUtils.tsx in #28389):
- CSVUtilsClassBase.tsx: getEntityName now from EntityNameUtils.
- MetricListPage.tsx / .test.tsx: getEntityBulkEditPath/getEntityImportPath
  now from EntityPureUtils.

Verified: openmetadata-service compiles (after spec regen), spotless clean,
17 changed UI test suites pass (309 tests).

This branch was previously deployed

1 inactive deployment
test — ee131ed0 Deployed Jun 10, 2026 by shah-harshit via playwright-ci-postgresql (6, 6) #50740
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 skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants