Repository navigation
[2.1] Fixes #38296: prevent duplicate list fetches on pagination - #38472
Merged
Merged
Conversation
* fix(ui): fetch paginated lists only in URL cursor effects (#38296) * fix(ui): fetch paginated lists only in URL cursor effects (#38296) * fix(ui): fetch paginated lists only in URL cursor effects (#38296) * fix(ui): fetch paginated lists only in URL cursor effects (#38296) * fix(ui): fetch paginated lists only in URL cursor effects (#38296) * fix(ui): fetch paginated lists only in URL cursor effects (#38296) * fix(classification): do not suppress first pagination fetch after page-1 switch * fix(ui): drop duplicate page fetch from remaining cursor paging handlers Services, Team users, Applications, Marketplace and Database schema version fetched the page in their Next/Previous handler and again in the pagingCursor effect. Keep the effect as the single fetch path, and add a Bots regression test asserting one request per page change. * fix(ui): page search results through the cursor effect; cap ClassificationDetails effect complexity Services and Team users still fetched in their search-mode page handler while the pagingCursor effect also fired (currentPage is part of the cursor): Services re-searched page 1, Team users reloaded the unfiltered team list. Make the effect the single fetch path for search paging too, and add regression tests. Move the page-1 check out of the ClassificationDetails effect so it is back under the ESLint complexity limit that failed ui-checkstyle. * fix(ui): reset Services paging when the service-type or deleted filter changes The search effect now pages by the URL page number, so a filter change that kept the previous page searched that page of the new filter and could land on an empty page. Reset page and cursor when the service-type filter value changes (not on sort) and when Show deleted is toggled, matching the search handler. * fix(ui): wait for the reset cursor before fetching filtered services A service-type filter change can commit its local page reset before the URL cursor catches up. Skip that transient mismatch so the old page is never searched and cannot race the replacement page-1 response. Keep the existing cursor effect as the single fetch path and preserve all preceding maintainer changes. Add a real-router regression that starts on page 2 with a cursor, selects Airbyte in the actual type filter, checks that only page 1 is requested, and verifies the matching service remains visible and the old cursor is cleared. The regression fails at dc695ed (page 2) and at 513a3c1 (requests for pages 2 and 1). With this fix, 70 tests across Services, Services paging, UserTab and ClassificationDetails pass locally. All 14 PR source files pass organize-imports, ESLint, Prettier and license-header checks. Node 22.23.5; no paid runner or service used. * fix(ui): apply only the newest list response in Services, Team users and Bots React Router applies URL paging resets in a transition, so a filter or search change can render (and fetch) once with the old page or cursor before the reset lands. Both requests then race and the older response could win. Track the latest request in each list fetch and ignore results, errors and loading state from superseded ones. Regression tests resolve the stale request last. * fix(ui): avoid duplicate team requests during search page resets Wait for the URL paging cursor to match the local currentPage before fetching team users. Search using that synchronized page while keeping the latest-request response guard. Add real-router regressions for starting a search from page 2 and clearing a search on page 2. Before the fix these issue search pages [2, 1] and two unfiltered requests; after the fix each sends one request for page 1. Exercise stale-response protection with two distinct searches instead of depending on an unwanted stale-page request. Validation: all 17 UserTab tests pass, with no failures or skips. Both new regressions fail against parent 5504a77. Organize imports, ESLint and Prettier pass for the two changed files. Addresses the UserTab finding in PR #38308 review 6018797346. * test(ui): cover the Bots latest-request guard on a deleted toggle Toggle Show deleted from page 1 with a before cursor so the stale-cursor request resolves last, and assert the newer deleted list stays rendered. Fails without the guard in fetchBots. * test(ui): cover the first Next after switching classification on page 1 Switching classification on page 1 leaves the URL unchanged, so the skip flag must not be set or the next Next click sends no request. Exercise it with real navigation and a Next button in the TableV2 mock, in its own file because the existing suite stubs useNavigate. Fails with the flag forced to true. --------- Co-authored-by: Sweta Agarwalla <[email protected]> (cherry picked from commit 55b747a)
gh-bot-collate
Bot
requested review from
sweta1308
and removed request for
a team
November 23, 2026 10:36
Author
|
🤖 This backport will not merge itself: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated backport of #38308 to
2.1.55b747a535e16193cda9bac9efd32a8ab655b101main.Opened from openmetadata-collate, which holds the credentials needed to open a PR here. It merges itself once this branch's required checks pass — no review needed. If a check fails it stays open and the author of #38308 is asked to look.
resolver run
No new production failure was established, but the classification test must meet the repository’s testing requirement before merging.
Findings
Summary
Removes direct fetches from pagination handlers so existing effects send the requests.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[User clicks Next or Previous] --> B[handlePageChange] B --> C[Update page and URL] C --> D[pagingCursor changes] D --> E[Existing effect fetches the page] E --> F[Show returned rows]Reviews (1) · Last reviewed commit: "Fixes #38296: prevent duplicate list fet..." · Reviewed by Greptile