Skip to content

server: page the provider list APIs - #117

Merged
littlegrasscao merged 3 commits into
mainfrom
server/split2/11a-provider-pagination
Oct 21, 2026
Merged

littlegrasscao merged 3 commits into
mainfrom
server/split2/11a-provider-pagination

Conversation

@littlegrasscao

@littlegrasscao littlegrasscao commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • page GET /shares, GET /shares/{share}/permissions, and GET /recipients with optional maxResults and pageToken query parameters; responses carry nextPageToken while more items remain
  • a page holds 500 items when maxResults is missing or 0, and never more; a negative size or a token this server did not issue is INVALID_PARAMETER_VALUE. Treating 0 as unset matches the list APIs of OSS Unity Catalog, which hosts these provider APIs; the recipient protocol lists keep the protocol's meaning of 0 (OpenSharing protocol: authenticate recipients and list granted shares #101)
  • page tokens are opaque encodings of an offset into a total order: shares and recipients by name, permissions by recipient name then privilege
  • Pagination is a static helper in core with no settings, so neither OpenSharing.Builder nor server.properties configures page sizes
  • PATCH /shares/{share}/permissions returns the first page of the share's permissions

Testing

  • mvn clean install: 121 tests passed
  • PaginationTest: tokens walk a 1200-item list in pages of 500, larger sizes are capped at 500, 0 pages like a missing size, and negative sizes and foreign tokens are rejected
  • ProviderListPaginationTest: with maxResults=2, each list walks page by page in order without duplicates, PATCH permissions returns the first page, maxResults=0 returns a full page, and a bad maxResults or pageToken is 400

Stacked on #100.

@littlegrasscao
littlegrasscao marked this pull request as ready for review October 9, 2026 17:04
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from 8e19e1f to 57df5a5 Compare October 13, 2026 23:46
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from 57df5a5 to af8b97b Compare October 13, 2026 23:55
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from af8b97b to 713c006 Compare October 14, 2026 00:06
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from 713c006 to 4e5e3ba Compare October 14, 2026 00:14
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from 4e5e3ba to e1f36ef Compare October 14, 2026 00:39
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from e1f36ef to 4020fb0 Compare October 14, 2026 00:42
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from 4020fb0 to 3b5a561 Compare October 14, 2026 00:56
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from 3b5a561 to 3099caa Compare October 14, 2026 19:24
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from 3099caa to 3e2b8a7 Compare October 15, 2026 16:46
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from 3e2b8a7 to 5045449 Compare October 15, 2026 18:13
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from 5045449 to b818c65 Compare October 15, 2026 18:29
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from b818c65 to f5f4246 Compare October 15, 2026 23:34
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from f5f4246 to 744ce0d Compare October 15, 2026 23:38
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from 744ce0d to d74e9e3 Compare October 16, 2026 00:41
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from d74e9e3 to fc59840 Compare October 19, 2026 17:12
@zhu-tom
zhu-tom added this pull request to stack #116 October 19, 2026 19:06
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch 3 times, most recently from 61259e0 to b5b3239 Compare October 19, 2026 22:31
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch 2 times, most recently from 8de1044 to 8b7f3b9 Compare October 21, 2026 17:01
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch 2 times, most recently from ab948d3 to d509dd4 Compare October 21, 2026 17:13
Base automatically changed from server/split2/11-recipient-activation to main October 21, 2026 18:49
@littlegrasscao
littlegrasscao force-pushed the server/split2/11a-provider-pagination branch from d509dd4 to 648f256 Compare October 21, 2026 18:49
@littlegrasscao
littlegrasscao merged commit c15f4d9 into main Oct 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants