Skip to content

Backport services, lineage, and data insight lazy-loading updates to 1.13#30136

Open
shah-harshit wants to merge 3 commits into
ui/backport-group14-explore-search-alerts-lazy-1.13from
ui/backport-group15-services-lineage-data-insight-lazy-1.13
Open

Backport services, lineage, and data insight lazy-loading updates to 1.13#30136
shah-harshit wants to merge 3 commits into
ui/backport-group14-explore-search-alerts-lazy-1.13from
ui/backport-group15-services-lineage-data-insight-lazy-1.13

Conversation

@shah-harshit

Copy link
Copy Markdown
Contributor

Summary

Stack

Testing

  • Scoped UI checkstyle sequence on changed source files: organize-imports-cli, ESLint --fix, Prettier.
  • git diff --check ff94c4f..HEAD

shah-harshit and others added 3 commits July 16, 2026 15:21
…y pattern (#29066)

* feat(ui): update Services & Ingestion components for lazy-load utility pattern

Updates Services and Ingestion components to import from extracted pure utility modules. Updates ServiceUtils, IngestionUtils, SchedularUtils imports. Updates service-related pages for consistent utility usage.

Ref: open-metadata/openmetadata-collate#4230

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* minor fix

* fix checkstyle and tests

* fix build

* fix checkstyle

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…ttern (#29063)

* feat(ui): update Entity & Lineage components for lazy-load utility pattern

Updates Entity and Lineage components to import from extracted pure utility modules. Updates LineageUtils, EntityVersionUtils, CanvasUtils imports. Updates EntityBreadcrumbUtils and EntitySummaryPanelUtils references.

Ref: open-metadata/openmetadata-collate#4230

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix failing checks

* fix build

* fix build, checkstyle and tests

* fix e2e tests

* fix checkstyle

* fix failing test

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…load utility pattern (#29069)

* feat(ui): update Dashboard, Pipeline, Chart & ML components for lazy-load utility pattern

Updates Dashboard, Pipeline, Chart, DataInsight and ML components to import from extracted pure utility modules. Updates DataInsightUtils, MetricUtils imports. Updates APIEndpoint and SearchIndex components for consistent utility usage.

Ref: open-metadata/openmetadata-collate#4230

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix test, build and checkstyle

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@shah-harshit
shah-harshit requested a review from a team as a code owner July 16, 2026 09:58
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Jul 16, 2026
@shah-harshit shah-harshit self-assigned this Jul 16, 2026
@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Too many files changed for review. (115 files found, 100 file limit)

Bypass the limit by tagging @greptile-apps to review.

Comment on lines +154 to +161
jest.mock('../../Customization/GenericProvider/GenericContext', () => ({
useGenericContext: jest.fn().mockImplementation(() => ({
data: mockData,
permissions: DEFAULT_ENTITY_PERMISSION,
onUpdate: mockHandleFeaturesUpdate,
setDisplayedColumns: jest.fn(),
})),
}));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Quality: Duplicate jest.mock for GenericContext in test

MlModelFeaturesList.test.tsx now has two jest.mock('../../Customization/GenericProvider/GenericContext', ...) calls (lines 145 and 154) targeting the exact same module path. Jest permits this and the last definition wins, so the earlier block is dead/redundant and misleading. Remove the stale first mock (or merge them) so the effective mock is obvious.

Was this helpful? React with 👍 / 👎

@gitar-bot

gitar-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Code Review 🚫 Blocked 0 resolved / 2 findings

Backports lazy-loading updates for services, lineage, and data insight components, but the build is currently blocked by an invalid import in PageViewsByEntitiesChart and duplicate mocks in MlModelFeaturesList.

🚨 Bug: CustomTooltip imported from module that doesn't export it

📄 openmetadata-ui/src/main/resources/ui/src/components/DataInsight/PageViewsByEntitiesChart.tsx:44-48

PageViewsByEntitiesChart.tsx now imports CustomTooltip from ../../utils/DataInsightPureUtils and renders it as <CustomTooltip />, but DataInsightPureUtils.ts does not export CustomTooltip — it is a JSX/React component that lives in DataInsightUtils.tsx (a .ts file cannot even hold JSX). This is a TS2305 "has no exported member" compile error and, if it slips past, would render an undefined component at runtime. Note DailyActiveUsersChart.tsx in the same PR correctly keeps CustomTooltip imported from DataInsightUtils. Split the import so only getGraphDataByEntityType/sortEntityByValue come from the Pure module and CustomTooltip stays from DataInsightUtils.

Keep CustomTooltip imported from DataInsightUtils (where it is actually exported), matching DailyActiveUsersChart.
import {
  getGraphDataByEntityType,
  sortEntityByValue,
} from '../../utils/DataInsightPureUtils';
import { CustomTooltip } from '../../utils/DataInsightUtils';
💡 Quality: Duplicate jest.mock for GenericContext in test

📄 openmetadata-ui/src/main/resources/ui/src/components/MlModel/MlModelDetail/MlModelFeaturesList.test.tsx:145 📄 openmetadata-ui/src/main/resources/ui/src/components/MlModel/MlModelDetail/MlModelFeaturesList.test.tsx:154-161

MlModelFeaturesList.test.tsx now has two jest.mock('../../Customization/GenericProvider/GenericContext', ...) calls (lines 145 and 154) targeting the exact same module path. Jest permits this and the last definition wins, so the earlier block is dead/redundant and misleading. Remove the stale first mock (or merge them) so the effective mock is obvious.

🤖 Prompt for agents
Code Review: Backports lazy-loading updates for services, lineage, and data insight components, but the build is currently blocked by an invalid import in PageViewsByEntitiesChart and duplicate mocks in MlModelFeaturesList.

1. 🚨 Bug: CustomTooltip imported from module that doesn't export it
   Files: openmetadata-ui/src/main/resources/ui/src/components/DataInsight/PageViewsByEntitiesChart.tsx:44-48

   PageViewsByEntitiesChart.tsx now imports `CustomTooltip` from `../../utils/DataInsightPureUtils` and renders it as `<CustomTooltip />`, but `DataInsightPureUtils.ts` does not export `CustomTooltip` — it is a JSX/React component that lives in `DataInsightUtils.tsx` (a `.ts` file cannot even hold JSX). This is a TS2305 "has no exported member" compile error and, if it slips past, would render an `undefined` component at runtime. Note DailyActiveUsersChart.tsx in the same PR correctly keeps `CustomTooltip` imported from `DataInsightUtils`. Split the import so only `getGraphDataByEntityType`/`sortEntityByValue` come from the Pure module and `CustomTooltip` stays from `DataInsightUtils`.

   Fix (Keep CustomTooltip imported from DataInsightUtils (where it is actually exported), matching DailyActiveUsersChart.):
   import {
     getGraphDataByEntityType,
     sortEntityByValue,
   } from '../../utils/DataInsightPureUtils';
   import { CustomTooltip } from '../../utils/DataInsightUtils';

2. 💡 Quality: Duplicate jest.mock for GenericContext in test
   Files: openmetadata-ui/src/main/resources/ui/src/components/MlModel/MlModelDetail/MlModelFeaturesList.test.tsx:145, openmetadata-ui/src/main/resources/ui/src/components/MlModel/MlModelDetail/MlModelFeaturesList.test.tsx:154-161

   MlModelFeaturesList.test.tsx now has two `jest.mock('../../Customization/GenericProvider/GenericContext', ...)` calls (lines 145 and 154) targeting the exact same module path. Jest permits this and the last definition wins, so the earlier block is dead/redundant and misleading. Remove the stale first mock (or merge them) so the effective mock is obvious.

Options

Display: compact → Showing less information.

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

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@github-actions

Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

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.

1 participant