feat(e2b): add sandbox refresh endpoint#512
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 |
|
Welcome @vishwas-droid! It looks like this is your first PR to openkruise/agents 🎉 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #512 +/- ##
=======================================
Coverage 78.63% 78.63%
=======================================
Files 181 182 +1
Lines 12879 12915 +36
=======================================
+ Hits 10127 10156 +29
- Misses 2374 2379 +5
- Partials 378 380 +2
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:
|
|
CC-@furykerry @zmberg @AiRanthem PTAL! |
Fixes #506
Summary
This change adds support for the E2B-compatible sandbox refresh endpoint:
POST /sandboxes/{sandboxID}/refreshes
The endpoint allows clients to refresh a sandbox's TTL without modifying other lifecycle operations.
What Changed
RefreshSandboxRequestmodel withdurationfield.RefreshSandboxhandler./sandboxes/{sandboxID}/refreshesroute.ExtendOnlytimeout updates to avoid shortening an existing longer deadline.Tests
Added coverage for:
Validation
CGO_ENABLED=0 go test ./pkg/servers/e2b/...