Repository navigation
Upgrade agent sandbox to v1.0.9 - #507
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #507 +/- ##
==========================================
+ Coverage 60.45% 63.90% +3.45%
==========================================
Files 35 35
Lines 3616 3657 +41
==========================================
+ Hits 2186 2337 +151
+ Misses 1211 1088 -123
- Partials 219 232 +13
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:
|
There was a problem hiding this comment.
🔵 Needs a closer look
The controller/CRD migration needs live-cluster validation against v1.0.9 for sandbox creation, warm-pool adoption, and cleanup, which unit tests and E2E compilation do not establish.
No open issues 🎉
What changed in this PR
Upgrades AgentCube’s agent-sandbox integration to v1.0.9, migrating Workload Manager to upstream v1beta1 APIs while leaving AgentCube’s own runtime/v1alpha1 API unchanged.
Changes:
- Adapts sandbox construction, claim references, warm-pool replicas, and readiness checks to the updated APIs.
- Adds regression coverage for serialization, resource versions, and warm-pool reconciliation.
- Updates dependencies, E2E setup, and installation documentation for v1.0.9.
| File | Description |
|---|---|
test/e2e/run_e2e.sh |
Installs v1.0.9 using the combined extensions manifest. |
test/e2e/e2e_test.go |
Switches upstream API imports to beta. |
pkg/workloadmanager/workload_builder.go |
Uses embedded blueprints and warm-pool claim references. |
pkg/workloadmanager/workload_builder_test.go |
Tests beta serialization, resource versions, and claim references. |
pkg/workloadmanager/sandbox_helper.go |
Uses beta sandbox types. |
pkg/workloadmanager/sandbox_helper_test.go |
Updates helper tests to beta types. |
pkg/workloadmanager/sandbox_controller.go |
Reconciles beta sandbox resources. |
pkg/workloadmanager/k8s_client.go |
Uses beta APIs and condition-based readiness checks. |
pkg/workloadmanager/informers.go |
Targets beta sandbox and claim resource versions. |
pkg/workloadmanager/handlers.go |
Uses beta sandbox and extension types. |
pkg/workloadmanager/handlers_test.go |
Updates imports and fixtures to beta APIs. |
pkg/workloadmanager/codeinterpreter_controller.go |
Adapts templates and pointer-valued warm-pool replicas. |
pkg/workloadmanager/codeinterpreter_controller_test.go |
Tests replica reconciliation and adapts template fixtures. |
Makefile |
Defaults E2E runs to v1.0.9 and forwards version overrides. |
go.sum |
Updates dependency checksums. |
go.mod |
Upgrades agent-sandbox and related dependencies. |
docs/getting-started.md |
Updates installation and removal commands for v1.0.9. |
cmd/workload-manager/main.go |
Switches upstream scheme imports to beta APIs. |
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The v1.0.9 CRD/controller upgrade needs fresh-cluster E2E validation of installation, warm-pool adoption, and cascading cleanup, as reported checks cover only unit tests and E2E compilation.
No open issues 🎉
Review effort: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Deprecated SandboxPodNameAnnotation references in handlers.go and handlers_test.go trigger the enabled SA1019 check and need narrowly scoped compatibility suppressions while preserving legacy support.
1 open issue
Review effort: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
The new unstructured readiness path in WaitForSandboxReady lacks regression tests covering success without status.phase and timeouts for false, unknown, or missing Ready conditions.
1 open issue
1 resolved since last review
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The controller/API migration and Claim-to-pool binding lack live v1.0.9 cluster validation of sandbox creation, warm-pool adoption/replenishment, and cleanup; reported unit tests and E2E compilation do not establish these runtime contracts.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
|
Local test report: (base) ➜ agentcube git:(upgrade) ✗ kubectl get sandbox
NAME READY REASON AGE
my-interpreter-7qf7f True DependenciesReady 17h
my-interpreter-pxw2r True DependenciesReady 17h
(base) ➜ agentcube git:(upgrade) ✗ python quickstart.py
2026-11-06 10:44:47,179 | INFO | agentcube.code_interpreter | Creating new session...
2026-11-06 10:44:48,200 | INFO | agentcube.code_interpreter | Session created: 3d8c4dcf-6219-4b8a-a614-0c75a4b24fb5
Hello from AgentCube!
2026-11-06 10:44:48,314 | INFO | agentcube.code_interpreter | Deleting session 3d8c4dcf-6219-4b8a-a614-0c75a4b24fb5...
(base) ➜ agentcube git:(upgrade) ✗ python quickstart.py
2026-11-06 10:44:50,664 | INFO | agentcube.code_interpreter | Creating new session...
2026-11-06 10:44:51,681 | INFO | agentcube.code_interpreter | Session created: f7508d2c-9372-4d99-b514-020537d01129
Hello from AgentCube!
2026-11-06 10:44:51,712 | INFO | agentcube.code_interpreter | Deleting session f7508d2c-9372-4d99-b514-020537d01129...
(base) ➜ agentcube git:(upgrade) ✗ kubectl get sandbox
NAME READY REASON AGE
my-interpreter-lmtg2 True DependenciesReady 13s
my-interpreter-t8lv5 True DependenciesReady 16sNow this PR is ready for review, please take a look when you are available |
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
|
Hi @acsoto, all comments are addressed, please take a look |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: acsoto The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |


What type of PR is this?
/kind enhancement
What this PR does / why we need it:
upgrade agent sandbox to v1.0.9
Migrate upstream API versions. Switch Workload Manager’s Sandbox and extensions imports, scheme registrations, object
apiVersionvalues, and dynamic-client resource versions fromv1alpha1tov1beta1. AgentCube’s ownruntime/v1alpha1API remains unchanged.Update Sandbox and template construction. Place
PodTemplateinside the new embeddedSandboxBlueprintfor both Sandboxes and SandboxTemplates. Remove the obsolete Sandboxreplicasfield, while retaining the existing lifecycle settings and unmanaged network-policy configuration.Update Claim references. Replace
SandboxClaim.spec.templateRefwithspec.warmPoolRef, pointing to the CodeInterpreter’s warm pool. Rename the builder parameter to reflect that it now identifies a pool, not a template.Adapt warm-pool reconciliation. Handle
SandboxWarmPool.spec.replicasas a pointer: set it when creating a pool, repair a nil value on an existing pool, and update it when the desired size changes.Use the supported readiness signal. Change
WaitForSandboxReady()to check for aReady=Truecondition instead of the removedstatus.phasefield.Add regression coverage. Test beta resource versions and object serialization, the Claim’s
warmPoolRef, template network-policy behavior, and warm-pool replica creation and updates.Which issue(s) this PR fixes:
Fixes: #464
Special notes for your reviewer:
AgentCube’s own
runtime/v1alpha1API is unchanged. Go unit tests and E2E compilation passed.GitHub Copilot assisted with the agent-sandbox API migration and regression tests.
Does this PR introduce a user-facing change?:
Yes. Installations now require the agent-sandbox v1.0.9 controller and APIs.