[WIP] feat(e2b): add dimension-aware API key quota#565
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #565 +/- ##
==========================================
- Coverage 79.84% 79.41% -0.44%
==========================================
Files 202 214 +12
Lines 14795 16361 +1566
==========================================
+ Hits 11813 12993 +1180
- Misses 2552 2843 +291
- Partials 430 525 +95
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ad19bc4 to
2117df0
Compare
Add the final Redis-backed quota architecture for E2B API keys with sandbox-manager-owned admission, accounting, anti-drift reconciliation, breaker handling, and metrics. Wire quota subject resolution through the E2B key stores and update sandbox-manager configuration, manifests, docs, unit tests, and e2e coverage for the final design. Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
806b23a to
11bdec7
Compare
Summary
Impact
This lets sandbox-manager reject over-quota API key usage before creating new sandbox resources, while keeping the quota implementation scoped to the E2B API and sandbox-manager layers.
Validation
GOCACHE=/private/tmp/go-build-cache /Users/sophon/Bin/go test ./pkg/cache ./pkg/sandbox-manager ./pkg/sandbox-manager/infra/sandboxcr ./pkg/servers/e2b ./pkg/servers/e2b/keys ./pkg/servers/e2b/models ./pkg/servers/e2b/quota