fix: batch Gateway Connector target scans - #1979
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #1979 +/- ##
=========================================
Coverage 96.94% 96.94%
=========================================
Files 325 325
Lines 17869 17884 +15
=========================================
+ Hits 17323 17338 +15
Misses 546 546 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
notgitika
left a comment
There was a problem hiding this comment.
thanks for addressing it!
| options: CoreOptions, | ||
| ): Promise<ListGatewayTargetsResponse> { | ||
| const pageSize = maxResults ?? DEFAULT_CONNECTOR_PAGE_SIZE; | ||
| const connectorPageSize = maxResults ?? DEFAULT_CONNECTOR_PAGE_SIZE; |
There was a problem hiding this comment.
nit: maxResults should be validated as an integer from 1–1000. currently 0, -1 or 1.25 is being accepted
There was a problem hiding this comment.
would the api reject this for us?
Hweinstock
left a comment
There was a problem hiding this comment.
i do think we should see if gateway is planning to support server side filters here, because this is fairly complex.
| options: CoreOptions, | ||
| ): Promise<ListGatewayTargetsResponse> { | ||
| const pageSize = maxResults ?? DEFAULT_CONNECTOR_PAGE_SIZE; | ||
| const connectorPageSize = maxResults ?? DEFAULT_CONNECTOR_PAGE_SIZE; |
There was a problem hiding this comment.
would the api reject this for us?
Summary
Follow-up to #1956, addressing the late review comments about raised Target quotas and one-request-per-Target behavior with
--max-results 1.Testing
bun test src/core/gateway.test.ts src/handlers/gateway/gateway.fixture.test.tsx(22 pass)bun run typecheckbun run lint:checkbun run format:checkbun run buildbun test src(1100 pass; 7 unchanged localsrc/io/exec.test.tsprocess-runner failures on files identical torefactor)