-
Notifications
You must be signed in to change notification settings - Fork 18
feat(server): support create sandbox from pool #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
2677a3a to
7f0d3a5
Compare
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f0d3a5280
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ) | ||
|
|
||
| sandbox = await Sandbox.create( | ||
| image, # TODO: no need to specify image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you clarify what this TODO means?
| mkdir -p /opt/opensandbox/execd && | ||
| cp ./execd /opt/opensandbox/execd/execd && | ||
| chmod +x /opt/opensandbox/execd/execd && | ||
| cat > /opt/opensandbox/execd/bootstrap.sh << 'BOOTSTRAP_EOF' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exed image has a bootstrap.sh script under /
Summary
Support creating sandboxes from existing resource pools via poolRef in extensions field
When poolRef is provided, the system uses pre-warmed pods from the pool instead of creating new ones
Only entrypoint and env can be customized in pool mode; image and resources are predefined by the pool
Implemented taskTemplate generation that dynamically injects environment variables
Environment variables are written to .env file at runtime using shell commands
User process runs in background mode to keep container alive
Testing
Breaking Changes
Checklist