Consolidate and clarify SandboxInfo fields in session store
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with pkg/common/types/sandbox.go and the comment in #521, then trace how SandboxInfo is stored and consumed by workloadmanager and router. Compare the in-record annotations approach with the separate-key option, including Redis and Valkey support and cleanup. Done means the field boundary and compatibility plan are agreed on; the issue does not specify a standalone implementation or test.
Written by the indexing model from the issue text.
Description
What would you like to be added:
Following up on the comment in #521 about revising SandboxInfo (pkg/common/types/sandbox.go) as the architecture evolves.
SandboxInfo currently has 11 flat fields on main, and upcoming work like E2B compatibility (#257 / #520) needs a few more. Before adding fields ad hoc, I'd like to align on how SandboxInfo should be cleaned up and where protocol-specific state should live:
- K8s resource vs. AgentCube workload identity:
Kind(Sandbox/SandboxClaim) sits next toWorkloadKind(AgentRuntime/CodeInterpreter), alongsideName,SandboxNamespace,SandboxID(K8s UID, currently only used for logging/response), andSessionID. Separating the K8s resource target from the workload source (e.g. pairingWorkloadKindwithWorkloadName, and checking whetherSandboxIDstill needs to be persisted) would make this much clearer. PodIPvs.EntryPoints:EntryPoints[i].Endpointcurrently embeds<podIP>:<port>. MakingPodIPa first-class field avoids parsingEntryPoints[0].Endpointwhen callers need direct pod access (such as E2B'senvdor custom ports), and lets us simplifyEntryPointslater if needed.- Protocol extensions and tokens: instead of adding protocol-specific top-level fields to
SandboxInfo, we can keep a generic systemAnnotations map[string]string(with namespaced keys) separate from user-suppliedMetadata map[string]string, treatingSandboxInfostrictly as an internal store record (never returned raw in HTTP responses or logged verbatim). The alternative is storing protocol state under a separate key, which avoids touchingSandboxInfobut requires generic KV support instore.Store(Redis + Valkey), an extra RTT on the proxy hot path, and dual-key GC cleanup. - Compatibility: renaming or nesting existing JSON fields in Redis/Valkey affects rolling upgrades between
workloadmanagerandrouter, so any structural refactor should be handled separately from feature PRs. For E2B in the meantime, we only need minimal generic additions (WorkloadName,PodIP,Metadata,Annotations).
Why is this needed:
Aligning on the SandboxInfo boundary now avoids ad-hoc field growth as new features land, and gives us a clean plan for consolidating the existing fields.
cc @zhzhuang-zju
- Dominant language
- Go
- Stars
- 176
- Forks
- 95
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from volcano-sh/agentcube
-
cli: `agentcube invoke` keeps sending an expired session ID and never recoversPossibly taken A pull request linked to this issue is open or already merged. Openkind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
volcano-sh/agentcube#533 ·
Maintainers usually reply within 1 day
-
Flaky TestGetPrivateKeyPEM in pkg/router due to direct deep equal assertion on rsa.PrivateKeyPossibly taken @0xA8hinav claimed this 207 days ago. Openkind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
volcano-sh/agentcube#348 · 1 comment ·
Maintainers usually reply within 1 day
-
Unify Redis and Valkey store implementations in pkg/storePossibly taken @GuTS805 claimed this 1 day ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 44/100
volcano-sh/agentcube#532 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 43/100
volcano-sh/agentcube#530 ·
Maintainers usually reply within 1 day
-
workloadmanager: POST /sandbox has no per-owner rate limitingPossibly taken @SoumaCloud claimed this 21 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 10/100
volcano-sh/agentcube#513 ·
Maintainers usually reply within 1 day
All issues in volcano-sh/agentcube
Similar issues
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rohitgollarahalli/mcpx#45 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
router-for-me/CLIProxyAPI#8851 ·
Maintainers usually reply within 7 days
-
Mend: dependency security vulnerability
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Windows 主机
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Lee-xeo/Claude-Cage#1550 ·
Maintainers usually reply within 1 day