Skip to content

perf: parallelize grant status API calls - #17

Merged
aaearon merged 1 commit into
mainfrom
feat/parallel-status-api
Feb 19, 2026
Merged

perf: parallelize grant status API calls#17
aaearon merged 1 commit into
mainfrom
feat/parallel-status-api

Conversation

@aaearon

@aaearon aaearon commented Feb 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • grant status now fires sessions + eligibility API calls concurrently via new fetchStatusData() in cmd/helpers.go
  • Wall-clock time drops from sum(all calls) to max(all calls), saving ~2s in practice
  • When --provider is set, only that CSP's eligibility is fetched (not all)
  • Eligibility errors are gracefully degraded (verbose warning, empty nameMap fallback)

Test plan

  • make test — all unit tests pass (new TestFetchStatusData table-driven tests + existing status tests)
  • grant status -v — parallel timing confirmed in verbose logs (sessions and eligibility interleave)
  • grant status -p aws -v — only 2 API calls (sessions + AWS eligibility), no Azure call
  • Eligibility failures don't break status display (graceful degradation)

Fire sessions + all-CSP eligibility requests concurrently via
fetchStatusData(), reducing wall-clock time from sum to max of
individual calls (~2s saving in practice).
@aaearon
aaearon force-pushed the feat/parallel-status-api branch from 5bdd295 to c609713 Compare February 19, 2026 07:21
@aaearon
aaearon merged commit 7f52705 into main Feb 19, 2026
1 check passed
@aaearon
aaearon deleted the feat/parallel-status-api branch February 19, 2026 07:23
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