Skip to content

Fixes 33885: stop the REST layer importing UI modules and enforce it - #33886

Merged
ShaileshParmar11 merged 8 commits into
mainfrom
ShaileshParmar11/eslint-rest-layer-imports
Sep 27, 2026
Merged

ShaileshParmar11 merged 8 commits into
mainfrom
ShaileshParmar11/eslint-rest-layer-imports

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #33885

I moved the request/response types that src/rest/** was importing from component, page, context and store modules down into the interface (and enum) layers, repointed every importer, and promoted openmetadata-imports/no-rest-ui-imports from warn to error.

rest/ is the bottom layer: the UI depends on it, not the reverse. Before this PR, 55 imports across 37 REST clients pointed back up at the UI — including one genuine cycle, context/LimitsProvider/useLimitsStore ⇄ rest/limitsAPI (the store imports the API, the API imported the store's types).

Every moved symbol is a type or enum, so there is no runtime change; tsc is the proof.

Type of change:

  • Improvement

High-level design:

Where things went — one canonical home per type, following DEVELOPER_HANDBOOK §10 (interface/[domain]/[feature].interface.ts), with enums in enums/:

New home Types
interface/entity/vote.interface.ts QueryVote, QueryVoteType, VotingDataProps
interface/entity/csv.interface.ts CSVExportResponse, CSVImportAsyncResponse
interface/entity/chart.interface.ts ChartType
interface/entity/asyncDelete.interface.ts AsyncDeleteJob, AsyncDeleteResponse, AsyncDeleteWebsocketResponse
interface/common/paging.interface.ts PagingResponse
interface/platform/service.interface.ts ServicePageData
interface/platform/application.interface.ts DataInsightLatestRun
interface/platform/limits.interface.ts LimitConfig, ResourceLimit
interface/platform/ruleEnforcement.interface.ts EntityRule
interface/lineage.interface.ts (existing) Edge, EdgeDetails, EdgeFromToData, NodeData, LineageNodeType, EntityLineageResponse, LineageData, LineageNodeData, LineagePagingInfo, Flatten, EntityChildren, EntityChildrenItem
interface/discovery/explore.interface.ts ExploreSearchIndex
interface/governance/glossary.interface.ts MoveGlossaryTermWebsocketResponse
interface/observability/dataQuality.interface.ts DataQualityDashboardChartFilters
interface/data-contract/contract.interface.ts ContractAllResult, ContractResultFilter
enums/permissions.enum.ts ResourceEntity
enums/Suggestion.enum.ts SuggestionAction
enums/DataQuality.enum.ts (existing) IncidentTimeMetricsType

AssetsOfEntity needed no move — AssetsTabs.interface only re-exported it from enums/Assets.enum, so the REST client now imports the source.

Why no re-export shims. Leaving export { X } from '<new path>' behind in the old component file would have cut the diff by ~250 files, but it leaves two valid import paths for every type and no signal about which one is canonical — new code would keep picking the component path. One location per type is the point of the exercise, so every importer moved.

Why the lineage cluster is bigger than the others. rest/lineageAPI.ts needs EntityLineageResponse, which references LineageNodeType, which references EntityChildren — so the reachable type graph moved as a unit rather than in pieces. All of it depends only on generated/, enums/ and interface/search.interface, so nothing dragged the UI down with it. LineageConfig needed nothing at all: it already lived in interface/lineage.interface.ts and was merely re-exported by EntityLineage.interface, so the REST client just points at the real definition now.

Rollout. UI-only, no schema, API or migration impact.

Tests:

Use cases covered

Behaviour is unchanged by construction — every moved symbol is a TypeScript type or a const enum value, and no call site's semantics changed, only the module it imports from. The risk this PR carries is "did a type move break a consumer", which the type checker and the existing suites answer directly.

Unit tests

  • Not applicable — no new logic; existing suites act as the regression net.

Full jest suite on this branch: 1590 of 1591 suites pass, 18376 of 18376 tests pass.

The one suite that fails, src/components/common/FilePreviewer/PdfRenderer.test.tsx, fails with Cannot find module 'pdfjs-dist' — a dependency present in package.json (^4) but missing from my local node_modules. It fails identically on unmodified main in my checkout and touches nothing in this PR.

Backend integration tests

  • Not applicable (no backend changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable — no user-visible behaviour changes.

Manual testing performed

  1. eslint 'src/rest/**/*.ts' → no-rest-ui-imports violations 55 → 0.
  2. Full eslint './src/**/*.{js,jsx,ts,tsx,json}' with the rule at error → 0 errors, 2882 warnings (down from 3213 on main — the 55 rest warnings plus circular-import and lower-layer warnings the moves also cleared).
  3. tsc --noEmit against an origin/main baseline worktree → 575 errors on both sides. Nine lines differ in text only, where TypeScript printed the members of the same union in a different order; same files, same codes, no new diagnostics.
  4. organize-imports-cli + eslint --fix + prettier over all 332 changed files, no residual diff.
  5. Full jest suite, as above.

UI screen recording / screenshots:

Not applicable — type-only refactor, no visual or behavioural change.

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: not applicable — no schema changes.
  • For UI changes: not applicable — no visual change.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • I have added tests around the new logic — not applicable; existing suites cover the moved types, results above.
  • For connector/ingestion changes: not applicable.

RetriggerConfidence Score: 5/5

The reviewed changes appear safe to merge, with no outstanding correctness, security, or repository-rule violations.

Summary

This PR relocates REST-facing TypeScript types and enums into lower-level interface and enum modules, updates consumers to use those canonical definitions, and promotes the REST-to-UI import restriction from a warning to an error.

Changes added since the previous review also replace the SSO nightly summary shell script with a Python generator that produces a Slack Block Kit table and a Markdown PR summary.

  • Removes direct src/rest/** dependencies on component, page, context, and store modules.
  • Consolidates moved types into domain-specific interface files.
  • Enforces openmetadata-imports/no-rest-ui-imports as an ESLint error.
  • Generates consolidated SSO results for Slack and pull-request comments.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  UI[Components / Pages / Context / Store] --> REST[REST clients]
  UI --> TYPES[Interfaces / Enums]
  REST --> TYPES
  REST --> GENERATED[Generated API types]
  LINT[no-rest-ui-imports: error] -. prevents reverse dependency .-> REST
Loading

Reviews (6) · Last reviewed commit: "style(ui): sort the repointed ResourceEn..."

Copilot AI lite review requested due to automatic review settings September 23, 2026 11:55
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Sep 23, 2026
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 73%
73.25% (106680/145619) 58.64% (65366/111458) 59.81% (21552/36030)

Copilot AI review requested due to automatic review settings September 23, 2026 12:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit cc52dbd3d87c695243d4c4f5f277b59b3bb1f051 in Playwright run 36301551911, attempt 1.

✅ 4603 passed · ❌ 0 failed · 🟡 2 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) 39m 12s

⏱️ Max setup 4m 40s · max shard execution 22m 41s · max shard-job elapsed before upload 26m 18s · reporting 22s

🌐 122.46 requests/attempt · 2.24 app boots/UI scenario · 43.13% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 43.13% (convergence target: at most 15%).
  • Application boot ratio was 2.24 per UI scenario (10932 boots / 4891 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard advanced-search-01 65 0 0 0 0 0
✅ Shard advanced-search-02 65 0 0 0 0 0
✅ Shard chromium-01 132 0 0 0 0 0
✅ Shard chromium-02 133 0 0 0 0 0
✅ Shard chromium-03 122 0 0 0 0 0
✅ Shard chromium-04 147 0 0 0 0 0
✅ Shard chromium-05 133 0 0 0 0 0
✅ Shard chromium-06 140 0 0 0 0 0
✅ Shard chromium-07 150 0 0 0 0 0
✅ Shard chromium-08 211 0 0 0 0 0
✅ Shard chromium-09 167 0 0 0 0 0
✅ Shard chromium-10 165 0 0 0 0 0
✅ Shard chromium-11 150 0 0 0 0 0
✅ Shard chromium-12 155 0 0 0 0 0
✅ Shard chromium-13 179 0 0 0 0 0
✅ Shard chromium-14 157 0 0 0 0 0
✅ Shard chromium-15 148 0 0 0 0 0
✅ Shard chromium-16 169 0 0 0 0 0
🟡 Shard chromium-17 171 0 1 0 0 0
✅ Shard chromium-18 138 0 0 0 0 0
✅ Shard chromium-19 182 0 0 0 0 0
✅ Shard chromium-20 161 0 0 0 0 0
🟡 Shard chromium-21 142 0 1 0 0 0
✅ Shard chromium-22 178 0 0 0 0 0
✅ Shard chromium-23 158 0 0 0 0 0
✅ Shard chromium-24 148 0 0 0 0 0
✅ Shard chromium-25 150 0 0 1 0 0
✅ Shard chromium-26 139 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 28 0 0 0 0 0
✅ Shard import-export-02 88 0 0 0 0 0
✅ Shard import-export-03 34 0 0 0 0 0
✅ Shard ingestion-01 32 0 0 0 0 0
✅ Shard ingestion-02 43 0 0 0 0 0
✅ Shard ingestion-03 26 0 0 0 0 0
✅ Shard reindex-01 41 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 2 flaky test(s) (passed on retry)
  • Features/Markdown.spec.ts › should render markdown (shard chromium-17, 1 retry)
  • Pages/DomainAdvanced.spec.ts › Remove multiple assets from domain at once (shard chromium-21, 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ShaileshParmar11

Copy link
Copy Markdown
Contributor Author

Collate side of this change: open-metadata/openmetadata-collate#6831 (draft) repoints Collate's imports of the 8 re-exported types to their new locations. Merge order: this PR first, then #6831, then a small follow-up here deletes the 8 re-exports.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@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: 805 → 805
- 0 added, 0 removed, 1 changed spec-list

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/src/generated/entity/services/ingestionPipelines/ingestionPipeline.ts

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 761 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), 761 warning(s) across 146 changed file(s).

Count Rule
547 react-hooks/exhaustive-deps
74 no-restricted-imports
40 openmetadata-imports/no-lower-layer-page-imports
38 openmetadata-imports/review-sequential-api-calls
19 openmetadata-imports/no-impure-pure-utils
13 openmetadata-imports/no-circular-imports
12 openmetadata-ui-patterns/no-non-adaptive-palette
12 openmetadata-imports/no-cross-page-imports
6 openmetadata-imports/no-api-calls-in-iteration
All findings
Location Rule Message
🟡 src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:28: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/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:107:6 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:138:6 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'getResourcePermission' and 't'. Either include them or remove the dependency array.
🟡 src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:144:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'fetchTemplates'. Either include it or remove the dependency array.
🟡 src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:148:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'fetchFunctions'. Either include it or remove the dependency array. Outer scope values like 'Fqn' aren't valid de
🟡 src/components/AppRouter/EntityImportRouter.tsx:72:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'navigate'. Either include it or remove the dependency array.
🟡 src/components/Chart/ChartDetails/ChartDetails.component.tsx:91:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'chartDetails'. Either include it or remove the dependency array.
🟡 src/components/Chart/ChartDetails/ChartDetails.component.tsx:123:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/Chart/ChartDetails/ChartDetails.component.tsx:151:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'fetchActivityCount' and 'fetchTaskCounts'. Either include them or remove the dependency array.
🟡 src/components/Chart/ChartDetails/ChartDetails.component.tsx:254:6 react-hooks/exhaustive-deps React Hook useMemo has missing dependencies: 'feedCount', 'fetchChart', 'getEntityFeedCount', and 'viewCustomPropertiesPermission'. Either include them or remov
🟡 src/components/Chart/ChartDetails/ChartDetails.component.tsx:288:5 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'tabs'. Either include it or remove the dependency array.
🟡 src/components/Chart/ChartDetails/ChartDetails.component.tsx:288: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/Classifications/ClassificationDetails/ClassificationDetails.tsx:303:8 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'isVersionView' and 'navigate'. Either include them or remove the dependency array.
🟡 src/components/Classifications/ClassificationDetails/ClassificationDetails.tsx:467:8 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/Classifications/ClassificationDetails/ClassificationDetails.tsx:543:7 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/Classifications/ClassificationDetails/ClassificationDetails.tsx:593:8 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'fetchClassificationChildren', 'handlePageChange', and 'isAddingTag'. Either include them or remove the dependenc
🟡 src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx:105:6 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'getEntityPermission'. Either include it or remove the dependency array.
🟡 src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx:130:5 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'fetchChartPermissions' and 't'. Either include them or remove the dependency array.
🟡 src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx:137:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'getAllChartsPermissions'. Either include it or remove the dependency array.
🟡 src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx:157:6 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx:297:5 react-hooks/exhaustive-deps React Hook useCallback has an unnecessary dependency: 'chartFilters'. Either exclude it or remove the dependency array.
🟡 src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx:408:5 react-hooks/exhaustive-deps React Hook useMemo has missing dependencies: 'dashboardDetails?.fullyQualifiedName', 'getChartPermissionFlags', 'hasEditGlossaryTermAccess', 't', 'tagFilter.Cla
🟡 src/components/Dashboard/DashboardDetails/DashboardDetails.component.tsx:97:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'dashboardDetails'. Either include it or remove the dependency array.
🟡 src/components/Dashboard/DashboardDetails/DashboardDetails.component.tsx:134:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/Dashboard/DashboardDetails/DashboardDetails.component.tsx:162:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'fetchActivityCount' and 'fetchTaskCounts'. Either include them or remove the dependency array.
🟡 src/components/Dashboard/DashboardDetails/DashboardDetails.component.tsx:187:5 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'dashboardDetails' and 'onDashboardUpdate'. Either include them or remove the dependency array. If 'onDashboard
🟡 src/components/Dashboard/DashboardDetails/DashboardDetails.component.tsx:279:6 react-hooks/exhaustive-deps React Hook useMemo has missing dependencies: 'customizedPage?.tabs', 'feedCount', 'fetchDashboard', 'getEntityFeedCount', and 'viewCustomPropertiesPermission'.
🟡 src/components/Dashboard/DashboardDetails/DashboardDetails.component.tsx:312:5 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'tabs'. Either include it or remove the dependency array.
🟡 src/components/Dashboard/DashboardDetails/DashboardDetails.component.tsx:312: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/Dashboard/DataModel/DataModels/DataModelsTable.tsx:131:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'pageSize'. Either include it or remove the dependency array.
🟡 src/components/Dashboard/DataModel/DataModels/DataModelsTable.tsx:198:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'handlePagingChange'. Either include it or remove the dependency array.
🟡 src/components/Dashboard/DataModel/DataModels/DataModelsTable.tsx:242:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'searchDataModels'. Either include it or remove the dependency array.
🟡 src/components/Dashboard/DataModel/DataModels/DataModelsTable.tsx:255:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'fetchDashboardsDataModel'. Either include it or remove the dependency array.
🟡 src/components/DataAssetSummaryPanelV1/DataAssetSummaryPanelV1.tsx:396:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'dataAsset'. Either include it or remove the dependency array.
🟡 src/components/DataAssetSummaryPanelV1/DataAssetSummaryPanelV1.tsx:480:6 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'entityType'. Either include it or remove the dependency array.
🟡 src/components/DataAssetSummaryPanelV1/DataAssetSummaryPanelV1.tsx:573:6 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'dataAsset'. Either include it or remove the dependency array.
🟡 src/components/DataAssetSummaryPanelV1/DataAssetSummaryPanelV1.tsx:586:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'fetchEntityBasedDetails' and 'fetchTestCases'. Either include them or remove the dependency array.
🟡 src/components/DataAssetSummaryPanelV1/DataAssetSummaryPanelV1.tsx:980:6 react-hooks/exhaustive-deps React Hook useMemo has missing dependencies: 'changeSummaryParams.fieldPrefix', 'isColumnEntity', 'renderCommonLayoutSummary', 'renderDataProductSummary', 'rend
🟡 src/components/DataAssetSummaryPanelV1/DataAssetSummaryPanelV1.tsx:993:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'init'. Either include it or remove the dependency array.
🟡 src/components/DataAssets/AssetsSelectionModal/AssetSelectionDrawer.tsx:18: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/DataAssets/AssetsSelectionModal/AssetSelectionModal.interface.ts:52: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/DataAssets/AssetsSelectionModal/useAssetSelectionState.ts:41: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/DataAssets/AssetsSelectionModal/useAssetSelectionState.ts:157:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'activeFilter'. Either include it or remove the dependency array.
🟡 src/components/DataAssets/AssetsSelectionModal/useAssetSelectionState.ts:222:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'fetchEntities'. Either include it or remove the dependency array.
🟡 src/components/DataAssets/AssetsSelectionModal/useAssetSelectionState.ts:350:15 openmetadata-imports/review-sequential-api-calls Review these sequential API requests. If they are independent, start them together with Promise.all/Promise.allSettled; keep sequencing only when data-dependent
🟡 src/components/DataAssets/AssetsSelectionModal/useAssetSelectionState.ts:542:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'onCancel' and 'onSave'. Either include them or remove the dependency array. If 'onSave' changes too often, find
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:253:5 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'hasFollowers'. Either include it or remove the dependency array.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:377:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'entityType', 'fetchActiveAnnouncement', 'fetchContainerAncestors', and 'fetchDQFailureCount'. Either include the
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:667:6 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'dataAsset.fullyQualifiedName'. Either include it or remove the dependency array.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:743:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'fetchDataContract'. Either include it or remove the dependency array.

… and 711 more. Run make ui-checkstyle-changed locally for the full list.


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

make ui-checkstyle-changed

QueryVote, QueryVoteType and VotingDataProps are request/response shapes
that 18 REST clients need, so they belong below the UI layer rather than
inside the table queries and voting component interfaces.
The rest clients imported page, component, context and store modules for
the request and response shapes they declare, which points the bottom
layer back up at the UI and is how import cycles start — limitsAPI and
useLimitsStore were already a cycle.

Move those shapes into interface/ (or enums/ for the enums) and repoint
every importer, then promote openmetadata-imports/no-rest-ui-imports from
warn to error now that the tree is clean.
…terface

Consumers outside this repository import the enum from this module path, so
re-export it from its new home in enums/permissions.enum rather than breaking
them.
…late

openmetadata-collate imports QueryVote, IncidentTimeMetricsType,
PagingResponse, AsyncDeleteWebsocketResponse, ExploreSearchIndex,
ResourceLimit and EntityChildren from the modules they used to live in.
Its CI builds Collate main against this branch, so re-export them from
those paths until Collate is repointed at the new locations.
Two donor modules still reference types that now live in interface/, and
resolving the rebase conflicts in favour of main's hunks dropped their
imports: CSVImportAsyncResponse in BulkEntityImportPage.interface and
EdgeDetails, EdgeFromToData and LineageNodeType in Lineage.interface.
Resolving the rebase conflict in useLimitsStore in favour of main dropped
the re-export Collate still imports.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The ledger now uses the same words as eslint.config.mjs, and a mismatch
reports 'error' !== 'warn' rather than 2 !== 1.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gitar-bot

gitar-bot Bot commented Sep 27, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Relocates shared UI types across hundreds of files and tightens ESLint enforcement.

Moves REST-facing types and enums into lower-level interface and enum modules, repoints all 55 importers across 37 REST clients, and enforces the no-rest-ui-imports ESLint rule as an error. This breaks the circular dependency between context/LimitsProvider/useLimitsStore and rest/limitsAPI. No issues found.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

Copy link
Copy Markdown

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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop the REST layer importing UI modules, then enforce it

4 participants