test(sandbox): add NFS kernel extraArgs integration test#168
test(sandbox): add NFS kernel extraArgs integration test#168devin-ai-integration[bot] wants to merge 3 commits into
Conversation
Add test case for creating a sandbox with nfs=enabled extraArgs, matching the new kernel variant added in controlplane PR #4348. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 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:
|
🔄 Interaction FlowThis PR adds an integration test for the sequenceDiagram
participant Test as Test Runner
participant SI as SandboxInstance
participant CP as Controlplane API
Test->>SI: create({name, image, extra_args: {nfs: "enabled"}, labels})
SI->>CP: POST /sandboxes (with nfs extra_arg)
CP-->>SI: 201 Created
SI-->>Test: sandbox created
Test->>SI: get(name)
SI->>CP: GET /sandboxes/{name}
CP-->>SI: Sandbox spec (with extra_args)
SI-->>Test: SandboxInstance
Test->>Test: assert extra_args["nfs"] == "enabled"
Test->>SI: delete(name)
SI->>CP: DELETE /sandboxes/{name}
CP-->>SI: 200 OK
Summary: The test validates the round-trip persistence of
Note Posted by PR Sequence Diagram · Tag @mendral-app with feedback. |
|
📋 Created Linear issue ENG-2980 — status: In Progress
Auto-created because no Linear reference was found in the PR title, description, or branch name. Note Posted by Linear Issue Enforcer · Tag @mendral-app with feedback. |
…t yet The test gracefully skips if the API returns 'unsupported extraArgs key nfs', and will automatically start passing once controlplane PR #4348 is deployed. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🧪 Testing GuideWhat this PR addressesAdds an integration test for a new Steps to reproduce / how to exercise
What to verify (expected behavior)
Note Posted by PR Testing Guide · Tag @mendral-app with feedback. |
Wrap entire post-create flow in try/finally with a 'created' flag so the sandbox is always cleaned up even if get/assertions fail. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
There was a problem hiding this comment.
LGTM
Previous resource leak concern is fully addressed — the created flag with a single try/except/finally ensures cleanup runs in all post-creation failure paths. Code is clean and follows the same patterns as the existing tests.
Tag @mendral-app with feedback or questions. View session
Fixes ENG-2980
Summary
Adds an integration test for the new
nfskernel variant inextra_args. The test creates a sandbox with{"nfs": "enabled"}and verifies the value persists on retrieval.Depends on controlplane PR https://github.com/blaxel-ai/controlplane/pull/4348 which adds
"nfs"to theallowedExtraArgKeysvalidation.Note: Generated client models (
sandbox_runtime_extra_args.py,sandbox_runtime.py) will auto-update on next OpenAPI codegen cycle once the controlplane spec is released.Link to Devin session: https://app.devin.ai/sessions/9fcb86f5a6fe43b5bd4e8aad77a95b1f
Requested by: @drappier-charles
Note
Adds an integration test for creating a sandbox with
nfs=enabledextra args, with graceful skip when NFS support isn't deployed yet and proper resource cleanup.Written by Mendral for commit 650d3e5.