Skip to content

Commit b2f9743

Browse files
committed
Fix Paginator dropping results on empty token pages (DECO-27280)
The Paginator stopped iterating at the first empty page even when the response carried a valid next_page_token, silently dropping results on later pages. Token-paginated endpoints (e.g. tables().list) can return empty intermediate pages with a token (UC filters out non-listable items), so the SDK could under-return — in the reported case it returned 0 tables where Python returned 23. Replace the public Paginator constructor with two explicit factories: - Paginator.newTokenPagination: iterate until nextPageFn returns null; empty pages are skipped, not treated as the end of results. - Paginator.newOffsetPagination: stop on the first empty page (offset/ SCIM/legacy-SQL APIs have no token and rely on this). The constructor is now private, so every call site must state its strategy. Regenerated all *API.java list methods to the appropriate factory (token APIs and clusters/events -> newTokenPagination; offset/SCIM/legacy-SQL -> newOffsetPagination) via the genkit java template change. Hand-written APIs updated manually: SharesExtAPI -> newTokenPagination; the SCIM Users/Groups/ServicePrincipals (and Account* variants) -> newOffsetPagination. PaginatorTest covers empty leading/intermediate token pages and offset stop-on-empty. Full SDK recompiled (mvn clean compile, 3902 sources). Signed-off-by: Hector Castejon Diaz <hector.castejon@databricks.com>
1 parent f8c4aa7 commit b2f9743

124 files changed

Lines changed: 349 additions & 181 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/AppsAPI.java

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/AppsSettingsAPI.java

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BudgetPolicyAPI.java

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/BudgetsAPI.java

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/LogDeliveryAPI.java

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundle/BundleAPI.java

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoreAssignmentsAPI.java

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountMetastoresAPI.java

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AccountStorageCredentialsAPI.java

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CatalogsAPI.java

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)