Repository navigation
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! |
Code Review ✅ Approved🟡 Medium risk · Resetting page and cursor parameters when switching domains could discard a user's expected position and change which data products appear. Fixes domain tree switching so pagination resets to page 1 with the selected page size and filters preserved, and standalone Data Products page links keep their requested page. No issues found. 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 |
Describe your changes:
Fixes #33066
Switching domains in the tree clears the previous domain's page and cursor position while retaining page size, filters, other query parameters and the URL fragment. Active filters are compared by serialized content so the paging reset does not rerun the domain search and reselect its first result. Standalone links to later Data Products pages retain their requested page.
Suggested reviewers
@karanh37 and @ShaileshParmar11. A maintainer must send the formal review request; the author has read access to the upstream repository.
Type of change:
High-level design:
N/A, small bug fix in the domain-selection owner. The shared pagination hook, backend search API and data models retain their existing contracts.
Tests:
Use cases covered
/domain/:fqn/data_products?currentPage=3&pageSize=25link stays on page 3.Unit tests
Added
openmetadata-ui/src/main/resources/ui/src/components/DomainListing/components/DomainTreeView.integration.test.tsxwith 15 cases using a real BrowserRouter, URL state/paging hooks, REST search conversion and tab lifecycle. The test substitutes the Tree and unrelated DomainDetails widgets; the browser tests exercise the complete application.RED evidence was recorded before each production change: the old handler hid B's known product on a stale page; clearing paging with active parent URL filters selected A again. Both regressions pass after the fixes.
From
openmetadata-ui/src/main/resources/ui:yarn test --runInBand --watch=false --runTestsByPath \ src/components/DomainListing/components/DomainTreeView.integration.test.tsx \ src/components/DomainListing/components/DomainTreeView.test.tsx \ src/components/Domain/DomainTabs/DataProductsTab/DataProductsTab.component.test.tsx \ src/hooks/paging/usePaging.integration.test.tsx \ src/hooks/useTableFilters.test.tsx --no-coverageResult: 5 suites passed, 46 tests passed, 4.731 seconds. Existing duplicate-key warnings remain in the old tree test fixtures.
Coverage command:
yarn test --runInBand --watch=false --runTestsByPath \ src/components/DomainListing/components/DomainTreeView.integration.test.tsx \ src/components/DomainListing/components/DomainTreeView.test.tsx \ --coverage \ --collectCoverageFrom=src/components/DomainListing/components/DomainTreeView.tsx \ --coverageReporters=json-summary --coverageReporters=text \ --coverageReporters=jsonResult: 29 tests passed. Whole-component coverage is 67.24% lines, 66.57% statements, 50.78% branches and 61.42% functions. This is below the 90% whole-component target. The change does not claim that the large tree component meets that target.
Backend integration tests
N/A, this issue changes no backend code or endpoint.
NOT NEEDED for this UI-only issue.
Ingestion integration tests
N/A, this issue changes no ingestion code.
Playwright (UI) tests
Added
playwright/e2e/Pages/DomainDataProductsPagination.spec.ts. Real MySQL, Elasticsearch, source-built backend and optimized production UI; no feature-route mocks. API fixtures create 51 source products and one destination product. Tests cover a tree switch with active domain filters and a direct third-page link.The final UI build passed in 30.88 seconds with
NODE_OPTIONS=--max-old-space-size=4096 yarn build. Local preview on port 3001 uses the existing API proxy; only ignored generated HTML placeholders were replaced as Java normally does. Source files and production JavaScript were unchanged by that preview adaptation. Standard--project=setup --workers=1authentication passed in 32.5 seconds and prepared all role states. The real repository sample workflow loaded 1022 source records and 1531 sink records in 1 minute 27.1 seconds; it recorded three unrelated incident Ack-transition sink errors and exited zero under its configured success threshold. The required TestDomain, TestDataProduct and nested Superset data model were each verified through HTTP 200 API responses.Final optimized-build result: 2 passed in 14.3 seconds (15.16 seconds Yarn wall time).
Final stability result: 20 passed, zero failures or retries, in 1.6 minutes (96.28 seconds Yarn wall time).
Earlier development-server evidence is retained: the initial two cases passed in 59.6 seconds before the real active-filter scenario was added. After correcting fixture authentication to reuse the existing cached admin API context, the active-filter cases passed four repeated tests with
--repeat-each=2 --workers=2in 66.9 seconds.The first four-worker attempt was stopped after eight sign-in failures. Traces showed
401 Invalid sessionwith an unexpired JWT. Repeated fixture logins had evicted the shared browser session under the server's five-session limit. The fixture now usesperformAdminLogin(browser)and shared cached credentials.A subsequent development-server four-worker attempt stopped with 2 navigation failures, 2 interrupted tests and 16 not run under host resource pressure. Both failures waited for the browser's full
loadevent before any feature assertion; local module requests took about 60 seconds and traces showed no HTTP 401. Navigation now waits fordomcontentloadedand then the existing positive UI and API assertions. Heavy Java and browser work were serialized and the final optimized-build stability run above passed all 20 cases. These failed attempts are not counted as passes.The official affected-spec planner selected the three UI files in this issue. Execution uses
PLAYWRIGHT_TEST_BASE_URL=http://localhost:3001, normal setup (PW_PRESEEDED_STATE=false),PLAYWRIGHT_RETRIES=0and two workers. The generated result block below records the selected specs and actual test command.Local Playwright run: PASSED
4e57bca9ba27(baseorigin/main) — uncommitted changes were presentplaywright/e2e/Features/Dashboards.spec.tsplaywright/e2e/Features/DataProductDomainMigration.spec.tsplaywright/e2e/Features/DataProductPersonaCustomization.spec.tsplaywright/e2e/Features/DataProductRename.spec.tsplaywright/e2e/Features/DataProductRenameConsolidation.spec.tsplaywright/e2e/Features/DomainFilterQueryFilter.spec.tsplaywright/e2e/Features/DomainIsolation/DomainDropdownIsolation.spec.tsplaywright/e2e/Features/DomainIsolation/DomainIncidentIsolation.spec.tsplaywright/e2e/Features/DomainIsolation/DomainLineageIsolation.spec.tsplaywright/e2e/Features/DomainIsolation/DomainListingIsolation.spec.tsplaywright/e2e/Features/DomainIsolation/DomainSearchIsolation.spec.tsplaywright/e2e/Features/DomainIsolation/DomainTaskIsolation.spec.tsplaywright/e2e/Features/DomainNavFilter/PersistedDomainFilter.spec.tsplaywright/e2e/Features/DomainTierCertificationVoting.spec.tsplaywright/e2e/Features/Glossary/GlossaryMutualExclusivityDataProductTree.spec.tsplaywright/e2e/Features/LandingPageWidgets/DomainDataProductsWidgets.spec.tsplaywright/e2e/Features/LandingPageWidgets/DomainWidgetFilter.spec.tsplaywright/e2e/Features/Permissions/DataProductPermissions.spec.tsplaywright/e2e/Features/Permissions/DomainPermissions.spec.tsplaywright/e2e/Features/SampleDataDomainDataProduct.spec.tsplaywright/e2e/Features/SearchSeparation/DomainRenamePrefixCascade.spec.tsplaywright/e2e/Features/Tasks/DomainFiltering.spec.tsplaywright/e2e/Flow/Navbar.spec.tsplaywright/e2e/Pages/DataMarketplace.spec.tsplaywright/e2e/Pages/DataProductAndSubdomains.spec.tsplaywright/e2e/Pages/DataProductCertificationFilter.spec.tsplaywright/e2e/Pages/DataProductODPS.spec.tsplaywright/e2e/Pages/DataProducts.spec.tsplaywright/e2e/Pages/DomainAdvanced.spec.tsplaywright/e2e/Pages/DomainDataProductsPagination.spec.tsplaywright/e2e/Pages/DomainDataProductsRightPanel.spec.tsplaywright/e2e/Pages/DomainUIInteractions.spec.tsplaywright/e2e/Pages/Domains.spec.tsplaywright/e2e/Pages/EntityDomainPropagation.spec.tsplaywright/e2e/Pages/Lineage/LineageControls.spec.tsplaywright/e2e/Pages/Policies.spec.tsplaywright/e2e/Pages/SubDomainPagination.spec.tsplaywright/e2e/auth.setup.tsplaywright/e2e/entity-data.setup.tsplaywright/e2e/entity-data.teardown.tsCommand
cd openmetadata-ui/src/main/resources/ui npx playwright test playwright/e2e/Features/Dashboards.spec.ts playwright/e2e/Features/DataProductDomainMigration.spec.ts playwright/e2e/Features/DataProductPersonaCustomization.spec.ts playwright/e2e/Features/DataProductRename.spec.ts playwright/e2e/Features/DataProductRenameConsolidation.spec.ts playwright/e2e/Features/DomainFilterQueryFilter.spec.ts playwright/e2e/Features/DomainIsolation/DomainDropdownIsolation.spec.ts playwright/e2e/Features/DomainIsolation/DomainIncidentIsolation.spec.ts playwright/e2e/Features/DomainIsolation/DomainLineageIsolation.spec.ts playwright/e2e/Features/DomainIsolation/DomainListingIsolation.spec.ts playwright/e2e/Features/DomainIsolation/DomainSearchIsolation.spec.ts playwright/e2e/Features/DomainIsolation/DomainTaskIsolation.spec.ts playwright/e2e/Features/DomainNavFilter/PersistedDomainFilter.spec.ts playwright/e2e/Features/DomainTierCertificationVoting.spec.ts playwright/e2e/Features/Glossary/GlossaryMutualExclusivityDataProductTree.spec.ts playwright/e2e/Features/LandingPageWidgets/DomainDataProductsWidgets.spec.ts playwright/e2e/Features/LandingPageWidgets/DomainWidgetFilter.spec.ts playwright/e2e/Features/Permissions/DataProductPermissions.spec.ts playwright/e2e/Features/Permissions/DomainPermissions.spec.ts playwright/e2e/Features/SampleDataDomainDataProduct.spec.ts playwright/e2e/Features/SearchSeparation/DomainRenamePrefixCascade.spec.ts playwright/e2e/Features/Tasks/DomainFiltering.spec.ts playwright/e2e/Flow/Navbar.spec.ts playwright/e2e/Pages/DataMarketplace.spec.ts playwright/e2e/Pages/DataProductAndSubdomains.spec.ts playwright/e2e/Pages/DataProductCertificationFilter.spec.ts playwright/e2e/Pages/DataProductODPS.spec.ts playwright/e2e/Pages/DataProducts.spec.ts playwright/e2e/Pages/DomainAdvanced.spec.ts playwright/e2e/Pages/DomainDataProductsPagination.spec.ts playwright/e2e/Pages/DomainDataProductsRightPanel.spec.ts playwright/e2e/Pages/DomainUIInteractions.spec.ts playwright/e2e/Pages/Domains.spec.ts playwright/e2e/Pages/EntityDomainPropagation.spec.ts playwright/e2e/Pages/Lineage/LineageControls.spec.ts playwright/e2e/Pages/Policies.spec.ts playwright/e2e/Pages/SubDomainPagination.spec.ts --workers=2The full affected run passed 305 tests with zero failed, flaky or skipped tests in 33.7 minutes. Existing
Domains.spec.tscleanup captured four HTTP 400 warning events for four classification fixtures, duplicated as eight entries in the combined reporter log. Their test assertions passed, but fixture cleanup is not claimed clean.Manual testing performed
No human manual test session is claimed. Automated real-browser steps exercised the following:
UI screen recording:
A verified recording shows Orders analytics with 51 products on page 3, switching to Customer analytics with one product on page 1, with page size 25 retained. Both viewport and source capture are 1920 by 1080 at 25 fps. The H.264 MP4 is 5.6 seconds and 597228 bytes; only the leading two seconds of loading were removed from the original 7.6-second capture. Encoded frames from both demonstrated states were inspected for readability. Raw WebM and the untrimmed MP4 are retained.
Recording upload pending. The installed GitHub CLI has no attachment flag, and authenticated browser upload is unavailable in this environment.
Recorded source was based on
4e57bca9ba27732435c040fe03eb0ceb37fd0d4c, with DomainTreeView.tsx SHA2563db90ff967da4f388b9a942aefb493c8973c4fd527e0984c946abecc20a1496a. The frontend is the optimized build of that source; the backend uses the current tested service jar, with private Docker MySQL and Elasticsearch. This is a standalone bug fix with a requested recording; the UI runs through production preview rather than a Docker UI image.Validation limitations
The final scoped organize-imports, ESLint and Prettier sequence passed with zero errors and seven existing hook-dependency warnings in DomainTreeView. All three source/test SHA256 values were unchanged after that sequence. The repository license checker/config passed on exactly those three files. Full Playwright lint passes with zero errors and 198 existing warnings.
The full UI type check reports 560 existing diagnostics and the Playwright type check reports 115 existing diagnostics, with none attributed to the three files in this issue. Independent clean-baseline/current-source compiler comparisons matched all 613 normalized UI diagnostics exactly, including every CLI diagnostic location/code, and all 115 Playwright diagnostics exactly by file, span, code and full message. The UI comparison's additional entries are declaration-only and compiler-wrapper diagnostics. Both full-project type checks still fail on existing errors; this change introduces zero new diagnostics. The repository token audit reports 86 errors and 47 warnings in untouched CSS and Less. No styles, generated models, workflows or suppression baselines were changed to mask those results.
Checklist:
Fixes 33066: Reset pagination when switching domains.Fixes #33066above.