Skip to content

Fixes #38295: keep Data Models and Stored Procedures pagination in sync - #38309

Merged
chirag-madlani merged 7 commits into
open-metadata:mainfrom
Kefia-02:fix/38295-persist-pagination-20261120
Nov 23, 2026
Merged

chirag-madlani merged 7 commits into
open-metadata:mainfrom
Kefia-02:fix/38295-persist-pagination-20261120

Conversation

@Kefia-02

@Kefia-02 Kefia-02 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Data Models and Stored Procedures each independently re-sync the page number from pagingCursor.currentPage in a useEffect. This duplicates usePaging's built-in URL synchronization and can revert the newly selected page under React Router transitions. Users see page 2 data with page number 1; refresh/search can then target the wrong page.

Change

  • Remove the redundant URL-to-page effects from DataModelsTable.tsx and StoredProcedureTab.tsx.
  • Rely on usePaging's centralized URL/current-page sync; retain existing click handlers, cursor-driven fetch, search resets, and page-size handling.

Fixes #38295.

Verification

Prepared with AI assistance.


Summary by Gitar

  • Pagination fix:
    • Stops NextPrevious from counting a phantom page past the known total when the previous cursor is set
  • Regression tests:
    • Added integration tests for Data Models and Stored Procedures paging with a real router
    • Added a NextPrevious test for page count with a known total
  • Browser tests:
    • Unpinned Data Models and Stored Procedures browser tests now that URL sync is fixed

This will update automatically on new commits.

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

Removes duplicate page synchronization from Data Models and Stored Procedures so usePaging owns the page state.

  • Data Model pages stay aligned with their cursor-based results.
  • Stored Procedure pages stay aligned with their cursor-based results.
  • The pager stops showing an extra page past a known total.

Reviews (10) · Last reviewed commit: "Merge branch 'main' into fix/38295-persi..." · Reviewed by Greptile

@Kefia-02
Kefia-02 requested a review from a team as a code owner November 20, 2026 12:56
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@sweta1308 sweta1308 added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch labels Nov 23, 2026
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

UI browser tests

Ran: all test files (no impact map from main yet)

Result: ✅ 1070 passed · 154 skipped

@gitar-bot

gitar-bot Bot commented Nov 23, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Centralizing URL-to-page synchronization and adjusting cursor page counts changes UI pagination, which could display or fetch the wrong page for affected lists.

Removes the redundant URL-to-page sync effects from Data Models and Stored Procedures so usePaging owns page synchronization, fixing page number drift after navigation. Also stops NextPrevious from counting a phantom page past the known total. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

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

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sweta1308
sweta1308 enabled auto-merge (squash) November 23, 2026 14:37
@chirag-madlani
chirag-madlani enabled auto-merge (squash) November 23, 2026 14:39
@chirag-madlani
chirag-madlani merged commit 6c8c3d8 into open-metadata:main Nov 23, 2026
57 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.1 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.0 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@gh-bot-collate

Copy link
Copy Markdown

🤖 Backport to 2.1 opened as #38504. Claude resolved a cherry-pick conflict to build it. It merges itself once the checks pass, so read the diff now if this change is a sensitive one.

@gh-bot-collate

Copy link
Copy Markdown

🤖 Backport to 2.0 opened as #38505. Claude resolved a cherry-pick conflict to build it. It merges itself once the checks pass, so read the diff now if this change is a sensitive one.

sweta1308 added a commit that referenced this pull request Nov 23, 2026
…nc (#38309) (#38505)

* 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

---------



(cherry picked from commit 6c8c3d8)

Co-authored-by: Kefia-02 <yoshimtsu4432@gmail.com>
Co-authored-by: Sweta Agarwalla <swetaagarwalla13@gmail.com>
Co-authored-by: Sweta Agarwalla <105535990+sweta1308@users.noreply.github.com>
sweta1308 added a commit that referenced this pull request Nov 23, 2026
…nc (#38309) (#38504)

* 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

---------



(cherry picked from commit 6c8c3d8)

Co-authored-by: Kefia-02 <yoshimtsu4432@gmail.com>
Co-authored-by: Sweta Agarwalla <swetaagarwalla13@gmail.com>
Co-authored-by: Sweta Agarwalla <105535990+sweta1308@users.noreply.github.com>
chirag-madlani added a commit that referenced this pull request Nov 25, 2026
… tests (#38651)

#38309 and #38308 fixed the Data Models / Stored Procedures page reset and the duplicate fetch on page change, so the browser tests no longer need the knownIssues escape hatch: the single-fetch assertion in paginationContract is now unconditional, the option is removed, the four Playwright tests for those tabs are tagged @migrated-browser again, and PAGINATION_MIGRATION.md reflects 35 tagged / 4 untagged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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 To release Will cherry-pick this PR into the release branch UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data Models and Stored Procedures tabs reset to page 1 after Next

4 participants