feat: add E2B-compatible sandbox network APIs#560
Conversation
Signed-off-by: Jayant <212013719+Jayant-kernel@users.noreply.github.com>
|
[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 #560 +/- ##
==========================================
- Coverage 79.66% 79.50% -0.16%
==========================================
Files 194 195 +1
Lines 13774 13878 +104
==========================================
+ Hits 10973 11034 +61
- Misses 2403 2427 +24
- Partials 398 417 +19
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:
|
Ⅰ. Describe what this PR does
This PR adds the E2B-compatible sandbox network API surface introduced by the E2B Python SDK 2.25.0.
It:
allow_internet_accessandnetworkwhen creating a sandbox;allowInternetAccessandnetworkin sandbox responses;PUT /sandboxes/{sandboxID}/networkfor both native and customized E2B paths;Updates use the latest Sandbox object and retry resource-version conflicts. Missing, paused, and concurrently modified sandboxes return the corresponding E2B-compatible status codes.
Ⅱ. Does this pull request fix one issue?
Fixes #504
Ⅲ. Describe how to verify it
The lifecycle coverage verifies create-time persistence and response fields, the authenticated
PUTroute, replacement semantics, and preservation of create-only settings.Ⅳ. Special notes for reviews
This change implements the E2B API and desired-state layer. Concrete L4/L7 enforcement remains part of the separate traffic-policy data-plane work described by the provisional network policy proposal.
On Windows, the broader E2B suite still encounters existing CSI tests that validate Unix absolute mount paths. The focused network tests and package compilation pass locally.