Repository navigation
fix(workspace): page through listMyWorkSpaces so workspace list returns all workspaces (prepare 2.10.3) - #325
Merged
Conversation
…ns all workspaces bl workspace list only returned the gateway's default first page (10 rows) even for accounts with more workspaces, and console workspace identity resolution could not resolve spaces beyond that page. Live probing plus the maas-x API registry confirm the zelda space.listWorkspaces service has no pagination inputs; the console frontend pages via the BailianControl POP layer, which the CLI gateway does not expose. listConsoleWorkspaces now calls space.listMyWorkSpaces with reqDTO.pageNo/pageSize (page size 100) and aggregates pages until total is reached. An empty page stops early, a 100-page guard raises instead of silently truncating, and an unrecognized response shape falls back to the legacy single-page read; server errors propagate untouched. Duplicate rows are kept so identity resolution still rejects ambiguous mappings. Dry-run and identity previews show the new API and first-page request. Verified live after browser console login: 30/30 unique workspaces listed and a third-page workspace resolves for log audit count.
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.
Summary
bl workspace listonly returned the first 10 workspaces for accounts with more (reported in the enterprise CLI feedback group: 20 workspaces exist, only 10 listed). The same single-page read backs console workspace identity resolution (resolveConsoleWorkspaceAgent), so workspaces beyond the first page could not be resolved for telemetry / alert / log / dataset / file / deploy commands either.Root cause verified against the live gateway and the maas-x API registry: the zelda
space.listWorkspacesservice has no pagination inputs at all (itsreqDTOonly carries filters). The console frontend pages through the BailianControl POPListWorkspaceslayer, which the CLI gateway does not expose — top-levelskip/maxResultsandreqDTO.pageNo/pageSizeon that API are all silently ignored (live-probed). The sibling APIspace.listMyWorkSpacesdoes acceptreqDTO.pageNo/pageSizeand returns{ list, total, pageNo, pageSize }with the same workspace fields (workspaceId/agentName/defaultAgent/tenantId).Changes
listConsoleWorkspacesnow callsspace.listMyWorkSpacesand pages rigorously:reqDTO.pageNo/pageSize(page size 100), aggregating untiltotalis reached.totalclaims more; a 100-page guard raises a bilingual error instead of silently truncating; an unrecognized response shape (nolist) falls back to the legacy single-pagelistWorkspacesread. Server errors still propagate untouched.bl workspace list --dry-runpreview shows the real first-page request and pagination plan; workspace identity previews point at the new API.Verification
bl workspace listreturns all 30/30 unique workspaces on an account that previously showed only 10; cross-page identity resolution verified withbl log audit count --workspace-id <30th workspace>(resolves tenantId from page 3 and completes the business query).packages/commands/tests/e2e/log.e2e.test.ts(multi-page aggregation + pageNo progression, single-page stop, legacy-shape fallback, empty-page early stop, non-convergence guard, dry-run zero-network, cross-page identity resolution); mocks updated to the new API contract across telemetry / alert / console-read / catalog output suites.vp check: 0 errors (2 pre-existing unrelated warnings). Node v22.23.0, default workers.