Skip to content

[2.0] Fixes #38295: keep Data Models and Stored Procedures pagination in sync - #38505

Merged
sweta1308 merged 1 commit into
2.0from
backport/2.0/pr-38309
Nov 23, 2026
Merged

sweta1308 merged 1 commit into
2.0from
backport/2.0/pr-38309

Conversation

@gh-bot-collate

@gh-bot-collate gh-bot-collate Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Automated backport of #38309 to 2.0.

Source PR #38309
Author @Kefia-02
Merge commit 6c8c3d89349c8592f7b709d34e36359d6b6b25be
Method Conflicts resolved by Claude — worth a read of the diff.

Resolution notes

Backport notes: PR #38309 → 2.0

Source: "Fixes #38295: keep Data Models and Stored Procedures pagination in sync"
(merge commit 6c8c3d89349c8592f7b709d34e36359d6b6b25be).

Clean cherry-picks (no action needed)

  • NextPrevious.tsx — fixes cursorTotalPages to stop counting a phantom
    page past the known total when paging.after is set but totalPages is
    already known.
  • NextPrevious.test.tsx — regression test for the above.
  • DataModelsTable.tsx / StoredProcedureTab.tsx — removes the redundant
    useEffect that re-synced currentPage from pagingCursor.currentPage,
    which fought with usePaging's own URL-to-page sync and caused the page
    to reset/desync.
  • DataModelsTable.integration.test.tsx / StoredProcedureTab.integration.test.tsx
    (new files) — plain Jest/RTL regression tests (mock NextPrevious and the
    REST call) proving the page number is preserved across a "next page" click.
    These are self-contained and don't depend on any main-only test
    infrastructure, so they applied without conflict.

Conflicts and how they were resolved

  • ServiceDataModels.browser.test.tsx and StoredProcedureTab.browser.test.tsx
    conflicted as "deleted by us, modified by them" (DU).
    Resolution: kept them deleted (removed the working-tree copies that the
    cherry-pick had restored from the "theirs" side).

    Reason: these files are written against a test/browser/paginationContract
    +test/browser/fixtures/* harness that does not exist anywhere on 2.0
    (git ls-tree -r HEAD | grep test/browser returns nothing). They were
    introduced on main after 2.0 diverged, as part of a newer
    "describePaginatedList" browser-test contract. The only change PR Fixes #38295: keep Data Models and Stored Procedures pagination in sync #38309
    makes to them is removing two knownIssues entries that recorded the bug
    this PR fixes — there is no equivalent file/harness on 2.0 to apply that
    change to, and porting the whole browser-test framework is out of scope
    for this fix. The actual regression coverage for 2.0 is provided by the
    two new .integration.test.tsx files listed above, which applied cleanly.

What a reviewer should check

  • Confirm openmetadata-ui/src/main/resources/ui/src/test/browser/ genuinely
    doesn't exist on 2.0 (it doesn't, as of this backport) — if a later
    backport introduces it, these two browser tests should be revisited.
  • Verify the two new integration tests pass under 2.0's Jest config:
    yarn test DataModelsTable.integration.test.tsx StoredProcedureTab.integration.test.tsx.
  • No other files from the source PR were skipped; NextPrevious.tsx,
    DataModelsTable.tsx, and StoredProcedureTab.tsx carry the identical
    logic change as on main.

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 #38309 is asked to look.

resolver run

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge; no actionable issues were found.

Summary

This backport removes competing page-sync effects from Data Models and Stored Procedures. It also stops the shared page indicator from adding a page beyond a known total.

  • Data Models and Stored Procedures keep the page number with cursor results.
  • The pager stops adding a page when the total is known.

Reviews (1) · Last reviewed commit: "Fixes #38295: keep Data Models and Store..." · Reviewed by Greptile

…nc (#38309)

* fix(pagination): let usePaging own URL-to-page synchronization (#38295)

* fix(pagination): let usePaging own URL-to-page synchronization (#38295)

* test: regression tests for Data Models and Stored Procedures paging sync (#38295)

* fix(pagination): don't count a phantom page past the known total

* test(pagination): unpin Data Models and Stored Procedures browser tests now that URL sync is fixed

---------

Co-authored-by: Sweta Agarwalla <swetaagarwalla13@gmail.com>
Co-authored-by: Sweta Agarwalla <105535990+sweta1308@users.noreply.github.com>
(cherry picked from commit 6c8c3d8)
@gh-bot-collate
gh-bot-collate Bot requested a review from a team as a code owner November 23, 2026 14:45
@gh-bot-collate
gh-bot-collate Bot requested review from shah-harshit and removed request for a team November 23, 2026 14:45
@gh-bot-collate gh-bot-collate Bot added the safe to test Add this label to run secure Github workflows on PRs label Nov 23, 2026
@gh-bot-collate

Copy link
Copy Markdown
Author

🤖 This backport will not merge itself: 2.0 has no required status checks, so there is nothing for auto-merge to wait on. Merge it by hand once CI is green.

@sweta1308
sweta1308 merged commit 13ff00c into 2.0 Nov 23, 2026
57 of 62 checks passed
@sweta1308
sweta1308 deleted the backport/2.0/pr-38309 branch November 23, 2026 15:03
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants