Conversation
…irst page (#798) DataScienceClient.list_apps() issued a single GET /apps and got only the server's default first page (100 items), which mixes workspace deployments with data apps. Callers filter client-side, so a project with many workspaces reported "No data apps found." It now pages with limit/offset (DATA_SCIENCE_APPS_PAGE_SIZE) until a short page, with a page cap guarding against a server that ignores offset.
This branch has not been deployed
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.
What
kbagent data-app listcould report "No data apps found." in a project that has data apps.DataScienceClient.list_apps()sent oneGET /appswith no query params. The Data Science API paginates that collection (default page = 100 items), and the page mixes workspace deployments (keboola.sandboxes) with data apps (keboola.data-apps). The service filters client-side, so when the first 100 deployments were all workspaces the list came back empty. In the reporter's project the first data app was item #258 of 1,114.Fix (client layer only)
list_apps()now pages withlimit/offsetuntil it gets a short (or empty) page, and returns the full collection. Both callers (DataAppService.list_data_appsand the sync engine's data-app type lookup inservices/_sync_data_app.py) get the complete list with no change on their side.constants.py:DATA_SCIENCE_APPS_PAGE_SIZE = 500(the page size the reporter verified) andDATA_SCIENCE_APPS_MAX_PAGES = 200. The page cap only stops an infinite loop if a server ignoresoffset; hitting it logs a warning.{"data": [...]}wrapped response shape is still accepted.gotchas.md, tagged(since vNEXT, #798). No version bump, no changelog entry.How tested
TestListAppsPaginationClientintests/test_data_app_service.py):limit=500&offset=0limit/offsetparams are checked{"data": [...]}shape worksoffsetTestDataAppListFiltersWorkspaces): 300 sandboxes plus 1 data app, and only the data app is listed.make check: 6908 passed, 15 skipped. Lint, format, ty and the doc/version gates are green.Fixes #798