Repository navigation
Fixes #32632: reset Impact Analysis pagination to page 1 on search/quick-filter change - #32699
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 succeededValidated commit ✅ 4501 passed · ❌ 0 failed · 🟡 6 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky 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) 58m 41s ⏱️ Max setup 4m 52s · max shard execution 24m 47s · max shard-job elapsed before upload 27m 51s · reporting 13s 🌐 218.25 requests/attempt · 2.31 app boots/UI scenario · 44.99% common-shard skew Optimization targets still in progress:
🟡 6 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
…32632) Add two E2E tests to Pagination.spec.ts that guard the fix introduced in #32632 (reset Impact Analysis pagination to page 1 on search/quick-filter change): - "should reset Impact Analysis table pagination to page 1 on search change" - "should reset Impact Analysis table pagination to page 1 on quick filter change" Both tests create 16 downstream TableClass entities (exceeding PAGE_SIZE_BASE=15) so two pages are reachable via ?pageSize=15 in the URL. Each test navigates to page 2, then triggers the filter/search, and asserts the page-indicator resets to "1 of X". Also adds skipUrlParamCheck option to testCompletePaginationWithSearch utility for callers where search state lives in component state rather than the URL. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ysis-pagination-to-pa-78f44a
🔄 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 |
|---|---|
| 11 | react-hooks/exhaustive-deps |
| 2 | openmetadata-imports/no-lower-layer-page-imports |
| 1 | openmetadata-ui-patterns/no-raw-title-attribute |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/Entity/EntityLineage/CustomControls.component.tsx:59: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/Entity/EntityLineage/CustomControls.component.tsx:196:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'selectedQuickFilters' and 'setSelectedQuickFilters'. Either include them or remove the dependency array. |
| 🟡 | src/components/Entity/EntityLineage/CustomControls.component.tsx:284:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array. |
| 🟡 | src/components/Entity/EntityLineage/CustomControls.component.tsx:526:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'handleClearAllClick'. Either include it or remove the dependency array. |
| 🟡 | src/components/Entity/EntityLineage/CustomControls.test.tsx:89:12 |
openmetadata-ui-patterns/no-raw-title-attribute |
Use from @openmetadata/ui-core-components instead of raw title="" attributes for consistent tooltip behavior. |
| 🟡 | src/components/LineageTable/LineageTable.tsx:56: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/LineageTable/LineageTable.tsx:477:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/LineageTable/LineageTable.tsx:600:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'handlePagingChange', 'setColumnLineageNodes', 'setFilterNodes', 'setLineagePagingInfo', and 'setLoading'. Eith |
| 🟡 | src/components/LineageTable/LineageTable.tsx:620:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'updateEntityData'. Either include it or remove the dependency array. |
| 🟡 | src/components/LineageTable/LineageTable.tsx:691:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has an unnecessary dependency: 'lineagePagingInfo'. Either exclude it or remove the dependency array. |
| 🟡 | src/components/LineageTable/LineageTable.tsx:837:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'entityType'. Either include it or remove the dependency array. |
| 🟡 | src/components/LineageTable/LineageTable.tsx:911:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has an unnecessary dependency: 'lineageDirection'. Either exclude it or remove the dependency array. |
| 🟡 | src/components/LineageTable/LineageTable.tsx:935:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'selectedQuickFilters' and 'setSelectedQuickFilters'. Either include them or remove the dependency array. |
| 🟡 | src/components/LineageTable/LineageTable.tsx:986:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'handlePageChange'. Either include it or remove the dependency array. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed…ysis-pagination-to-pa-78f44a
…ysis-pagination-to-pa-78f44a
|



Detail bug report: View on Detail
Describe your changes:
Fixes #32632
I worked on the Impact Analysis table's pagination reset behavior because on any page ≥ 2, typing in the search box, changing a quick filter, or clicking "Clear all" did not reset
currentPageto 1 before refetching. The next fetch then used a stalefrom = (currentPage - 1) * pageSizepast the now-narrower result set, rendering an emptyNoDataPlaceholder(and at the defaultpageSize=50the pager/footer vanished entirely, leaving no in-component way to recover the filtered view).Root cause: the search box and quick filters were wired straight to the state setters (
setSearchValue,setSelectedQuickFilters) with nohandlePageChange(1), unlike the impact-level and direction handlers which already reset the page. The column-level branch had the same defect at its in-memorynodes.slice(...)step. Introduced when #25353 rewiredonSearchValueChange={setSearchValue}for both impact levels without adding the reset.Type of change:
High-level design:
N/A — small change. The reset is committed synchronously in the same handler as the filter state change (not a separate
useEffect, which would race the existing fetch effect and dispatch a stale-fromrequest first).LineageTable.tsx: addhandlePageReset(handlePageChange(1)) andhandleSearchValueChange(handlePageReset()thensetSearchValue(value)); passonSearchValueChange={handleSearchValueChange}(was rawsetSearchValue) and newonPageReset={handlePageReset}toCustomControlsComponent. The single handler serves both Table-level (server-pagedfrom/size) and Column-level (in-memory slice) impact modes.CustomControls.component.tsx: add optionalonPageReset?: () => void;handleQuickFiltersValueSelectcalls it beforesetSelectedQuickFilters; the Clear-all button calls a newhandleClearAllClick(handleClearAllFilters()+onPageReset?()).handleClearAllFiltersstays pure (still used byhandleTabChange, so tab switches do not reset the page). The optional prop keeps the Lineage graph view (which omits it) unaffected.Tests:
Use cases covered
onPageResetprop) still renders and is unaffected.Unit tests
openmetadata-ui/src/main/resources/ui/src/components/LineageTable/LineageTable.test.tsx— 3 new tests underdescribe('pagination reset on filter/search change'): search-change reset for Table-level and Column-level, andonPageResetwiring.openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityLineage/CustomControls.test.tsx— 3 new tests underdescribe('onPageReset - quick filter pagination reset'): quick-filter-select reset, Clear-all reset, and tab-change no-reset (decoupling guard).Test Suites: 2 passed, 2 total). Verified the 5 assertions fail on the un-fixed source (stashed the source, kept the tests →5 failed, 57 passed) and pass with the fix, so they genuinely guard the behavior.Backend integration tests
getLineageByEntityCountfrom/sizehandling is unchanged.Ingestion integration tests
Playwright (UI) tests
ImpactAnalysis.spec.tsis unchanged by this fix and continues to compile/run (verifiedplaywright test --listreports 26 tests, exit 0). The bug's precondition (page ≥ 2 atpageSize=50) requires >50 within-depth lineage entities, which the suite's fixtures (~6 nodes) don't reach, so the existing E2E does not cover the failing path; the regression is guarded by the Jest unit tests above.Manual testing performed
No manual UI walkthrough was run in this session — it requires a running server stack. Attempts to stand one up are summarized under "Tests that could not be run" below.
UI screen recording / screenshots:
Not applicable. (The change is a behavioral fix to pagination reset, with no visible layout change; the empty-state recovery is covered by the unit tests above. A recording against a live stack with >50 within-depth lineage entities would be a useful follow-up but wasn't produced here.)
Checklist:
Fixes <issue-number>: <short explanation>Fixes #32632above.Routine checks: unit tests (62/62), broad Lineage/paging/TableV2 regression (37 suites, 763 tests), ESLint (0 errors, 15 pre-existing warnings), Prettier (clean), and
tsc --noEmit(no new errors in the changed files — the oneLineageTable.tsx dataSourceTS2322 is pre-existing onorigin/main) all pass.Tests that could not be run: the Playwright E2E suite (
ImpactAnalysis.spec.ts) and a manual UI walkthrough both require a running OpenMetadata server onlocalhost:8585. I attempted to unblock the E2E: installed the Chromium binary (npx playwright install chromium), installed the missing system libraries (npx playwright install-deps chromium, which installedlibatk-1.0.so.0etc.), and confirmed the spec compiles (playwright test --list→ 26 tests, exit 0). The browser then launched but authentication hitnet::ERR_CONNECTION_REFUSED at http://localhost:8585/signin. I next trieddocker compose pullfor the quickstart stack: Elasticsearch pulled, butdocker.getcollate.io/openmetadata/server:1.12.0-SNAPSHOTreturnedmanifest unknown(the SNAPSHOT image is not published), so the server stack could not be stood up. Building the server image from source via a full Maven build was the only remaining unblock and was not attempted. The runtime behavior the E2E would check is covered by the Jest suites above.Automatic Fixes PRs can be configured here.