Skip to content

perf: parallelize buildWorkspaceNameMap API calls - #18

Merged
aaearon merged 1 commit into
mainfrom
perf/parallelize-workspace-name-map
Feb 19, 2026
Merged

perf: parallelize buildWorkspaceNameMap API calls#18
aaearon merged 1 commit into
mainfrom
perf/parallelize-workspace-name-map

Conversation

@aaearon

@aaearon aaearon commented Feb 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaced sequential per-CSP eligibility loop in buildWorkspaceNameMap() with concurrent goroutine fanout, mirroring the pattern already used in fetchStatusData()
  • Affects grant revoke interactive mode — workspace name resolution now runs in parallel when sessions span multiple CSPs
  • Added comprehensive table-driven tests covering multi-CSP, deduplication, partial failure, and context cancellation

Test plan

  • All existing tests pass (go test ./... -race)
  • New TestBuildWorkspaceNameMap covers 6 scenarios including concurrency edge cases
  • Race detector passes on all new concurrent code
  • Manual: grant revoke interactive mode with sessions across both Azure and AWS

Replace sequential per-CSP eligibility loop with goroutine fanout in
buildWorkspaceNameMap(), mirroring the pattern already used in
fetchStatusData(). This benefits grant revoke interactive mode when
the user has sessions across multiple CSPs.
@aaearon
aaearon merged commit b1fa9f0 into main Feb 19, 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.

1 participant