Skip to content

Conversation

@hittyt
Copy link
Collaborator

@hittyt hittyt commented Dec 31, 2025

…overrides

Summary

Refines the OpenSandbox Batch Sandbox API specification (specs/batch-sandbox.yml) to improve scalability for high-volume provisioning and ensure architectural consistency across the platform.

Testing

  • Not run (only openAPI spec design)
  • Unit tests
  • Integration tests
  • e2e / manual verification

Breaking Changes

  • None
  • Yes (describe impact and migration path)

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

type: integer
minimum: 0
description: Replica index within the batch
sandboxId:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who is responsible for generating sandbox-id? The k8s operator or api service?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the k8s cluster mode, sandbox-id should be generated by the operator.
api server is responsible for wrapping it into the BatchSandboxMember object.

description: Batch creation timestamp
required: [id, status, replica, poolRef, createdAt]

BatchSandbox:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. timeout. shall we add timeout field for BatchSandbox like single Sandbox timeout filed used for TTL.
  2. how about we also support resource_limits field to specify container resource. Use case example: user didn't need pooling, just declare list of image, env, commandand argsinsandbox_override ` field, in this case, the system should create batch of Pods directly using user's declaration.

Copy link
Collaborator Author

@hittyt hittyt Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. timeout field is added with description.
  2. I recommend omitting the resource_limits field to maintain API simplicity. Since batch provisioning relies on
    pre-warmed buffers within a Pool for instant startup, allowing ad-hoc resource overrides alongside a mandatory poolRef creates ambiguity and undermines the performance benefits of the pool.

@hittyt hittyt requested a review from Spground January 7, 2026 06:42
@hittyt hittyt closed this Jan 8, 2026
@hittyt
Copy link
Collaborator Author

hittyt commented Jan 8, 2026

After further discussion, we've realized that the batch-sandbox API isn't strictly
necessary at this stage since there are no clear, high-priority use cases for it yet. I'd rather keep the project
scope focused and avoid adding complexity prematurely. We can revisit this design if and when a concrete requirement
for batch operations emerges. Thanks to everyone for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants