feat: add updateNetwork static method to SandboxInstance#277
Draft
devin-ai-integration[bot] wants to merge 1 commit into
Draft
feat: add updateNetwork static method to SandboxInstance#277devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Add updateNetwork() following the same pattern as updateTtl() and
updateLifecycle() to allow updating proxy/network config via the
existing PUT /sandboxes/{name} endpoint without triggering pod recreation.
Import SandboxNetwork type from client as SandboxNetworkConfig to avoid
name collision with the SandboxNetwork class.
Includes integration test verifying that updating network config
preserves sandbox files (no pod recreation).
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
There was a problem hiding this comment.
LGTM
The implementation correctly follows the established updateTtl/updateLifecycle pattern — fetch, spread-merge the spec, PUT, return a new attached instance. The SandboxNetworkConfig alias cleanly avoids the name collision with the SandboxNetwork class. No security, correctness, or data-loss issues.
Tag @mendral-app with feedback or questions. View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
updateNetworkstatic method toSandboxInstance, following the same pattern asupdateTtlandupdateLifecycle. This allows updating proxy/network config via the existingPUT /sandboxes/{name}endpoint without triggering pod recreation.The
SandboxNetworktype from the generated client is imported asSandboxNetworkConfigto avoid a name collision with theSandboxNetworkclass (from./network/index.js) already used in the file.Includes an integration test that verifies updating network config preserves sandbox files (i.e., no pod recreation occurred).
Review & Testing Checklist for Human
NO_PROXYtoenvVarsIgnored) is deployed to the environment where integration tests run. If the controlplane change isn't deployed yet, this test will fail — verify deployment order or mark test as skipped until the backend change lands.SandboxNetworkConfigis used to disambiguate from theSandboxNetworkclass. Confirm this naming convention is acceptable vs. alternatives (e.g., importing from../client/types.gen.jsdirectly).bun run testwith appropriate env vars) against a dev environment that has the controlplaneNO_PROXYchange deployed to verify end-to-end behavior.Notes
NO_PROXYtoenvVarsIgnored— that change must be deployed before this integration test can pass.Link to Devin session: https://app.devin.ai/sessions/d34971d15d0a42bbaf14d589ffefd426
Requested by: @Joffref
Note
Adds a
updateNetworkstatic method toSandboxInstancethat updates proxy/network config viaPUT /sandboxes/{name}without triggering pod recreation. Follows the same pattern asupdateTtlandupdateLifecycle. Includes an integration test verifying file persistence after the update.Written by Mendral for commit c963380.