Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
bc1296f
docs(k8s): upadte README
Spground Jan 15, 2026
0f63d88
feat(k8s): add pool strategy abstraction for batch sandbox & refactor…
Spground Jan 15, 2026
284ea7c
feat(components/execd): modify web framework to gin
Pangjiping Jan 15, 2026
c5e192a
fix(task-executor): add json tag for task-executor apis
fengcone Jan 15, 2026
e16fafb
fix(components/execd): fix potential reverse proxy buffer issue
Pangjiping Jan 15, 2026
0507444
Merge pull request #91 from Spground/feature/public-fix-k8s-module-re…
Spground Jan 15, 2026
b69aa21
Merge pull request #93 from Spground/feature/public-add-batchsandox-p…
Spground Jan 15, 2026
1eb5342
Merge pull request #95 from fengcone/feature/public-json-tag
Spground Jan 15, 2026
dfa69bc
fix(components/execd): modify sse Connection header to close
Pangjiping Jan 15, 2026
ee38bb4
fix(components/execd): modify sse Connection header to close
Pangjiping Jan 16, 2026
f5bb379
fix(task-executor): fix env inheritance
fengcone Jan 16, 2026
e6af623
Merge pull request #100 from fengcone/feature/public-fixenv
Spground Jan 16, 2026
aec8bdc
feat(components/execd): support parse sse api grace shutdown timeout …
Pangjiping Jan 16, 2026
54918e1
Merge pull request #101 from Pangjiping/feat/execd/envs
hittyt Jan 16, 2026
ed63a45
Merge pull request #94 from Pangjiping/refactor/execd
hittyt Jan 16, 2026
26c8581
fix(components/execd): fix code conflict by merge
Pangjiping Jan 16, 2026
0365424
Merge pull request #103 from Pangjiping/hotfix/merge-error
ninan-nn Jan 16, 2026
307503e
refactor(sdks): refactor http connection config
ninan-nn Jan 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,21 +170,21 @@ For more details, please refer to [examples](examples/README.md) and the README

## Project Structure

| Directory | Description |
|-----------|-------------|
| [`server/`](server/README.md) | Python FastAPI sandbox lifecycle server |
| [`components/execd/`](components/execd/README.md) | Sandbox execution daemon (commands and file operations) |
| [`components/ingress/`](components/ingress/README.md) | Sandbox traffic ingress proxy |
| [`components/egress/`](components/egress/README.md) | Sandbox network egress control |
| [`sdks/`](sdks/) | Multi-language SDKs (Python, Java/Kotlin) |
| [`sandboxes/`](sandboxes/) | Sandbox runtime images (e.g., code-interpreter) |
| [`kubernetes/`](kubernetes/README.md) | Kubernetes operator and batch sandbox support |
| [`specs/`](specs/README.md) | OpenAPI specifications |
| [`examples/`](examples/README.md) | Integration examples and use cases |
| [`oseps/`](oseps/README.md) | OpenSandbox Enhancement Proposals |
| [`docs/`](docs/) | Architecture and design documentation |
| [`tests/`](tests/) | Cross-component E2E tests |
| [`scripts/`](scripts/) | Development and maintenance scripts |
| Directory | Description |
|-----------|------------------------------------------------------------------|
| [`server/`](server/README.md) | Python FastAPI sandbox lifecycle server |
| [`components/execd/`](components/execd/README.md) | Sandbox execution daemon (commands and file operations) |
| [`components/ingress/`](components/ingress/README.md) | Sandbox traffic ingress proxy |
| [`components/egress/`](components/egress/README.md) | Sandbox network egress control |
| [`sdks/`](sdks/) | Multi-language SDKs (Python, Java/Kotlin, Typescript/Javascript) |
| [`sandboxes/`](sandboxes/) | Sandbox runtime images (e.g., code-interpreter) |
| [`kubernetes/`](kubernetes/README.md) | Kubernetes operator and batch sandbox support |
| [`specs/`](specs/README.md) | OpenAPI specifications |
| [`examples/`](examples/README.md) | Integration examples and use cases |
| [`oseps/`](oseps/README.md) | OpenSandbox Enhancement Proposals |
| [`docs/`](docs/) | Architecture and design documentation |
| [`tests/`](tests/) | Cross-component E2E tests |
| [`scripts/`](scripts/) | Development and maintenance scripts |

For detailed architecture, see [docs/architecture.md](docs/architecture.md).

Expand Down
10 changes: 10 additions & 0 deletions components/execd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,16 @@ curl -X POST -H "Content-Type: application/json" \
http://localhost:44772/code
```

## Configuration

### API graceful shutdown window

- Env: `EXECD_API_GRACE_SHUTDOWN` (e.g. `500ms`, `2s`, `1m`)
- Flag: `--graceful-shutdown-timeout`
- Default: `1s`

This controls how long execd keeps SSE responses (code/command runs) alive after sending the final chunk, so clients can drain tail output before the connection closes. Set to `0s` to disable the grace period.

## Observability

### Logging
Expand Down
10 changes: 10 additions & 0 deletions components/execd/README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,16 @@ curl -X POST -H "Content-Type: application/json" \
http://localhost:44772/code
```

## 配置

### SSE API 优雅结束时间窗口

- 环境变量:`EXECD_API_GRACE_SHUTDOWN`(如 `500ms`、`2s`、`1m`)
- 命令行参数:`--graceful-shutdown-timeout`
- 默认值:`1s`

作用:控制 SSE 响应(代码/命令执行)在发送最后一块数据后,保持连接的宽限时间,方便客户端完全读到尾部输出再关闭。如果设置为 `0s` 则关闭这一等待。

## 可观测性

### 日志记录
Expand Down
28 changes: 17 additions & 11 deletions components/execd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,60 @@ module github.com/alibaba/opensandbox/execd
go 1.24.0

require (
github.com/beego/beego/v2 v2.3.8
github.com/bmatcuk/doublestar/v4 v4.9.1
github.com/gin-gonic/gin v1.10.0
github.com/go-playground/validator/v10 v10.28.0
github.com/go-sql-driver/mysql v1.8.1
github.com/google/uuid v1.6.0
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674
github.com/shirou/gopsutil v3.21.11+incompatible
github.com/stretchr/testify v1.10.0
go.uber.org/automaxprocs v1.6.0
go.uber.org/zap v1.27.0
k8s.io/apimachinery v0.34.2
k8s.io/client-go v0.34.2
)

require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/bytedance/sonic v1.11.6 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.10 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect
github.com/tklauser/go-sysconf v0.3.16 // indirect
github.com/tklauser/numcpus v0.11.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.uber.org/multierr v1.10.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/crypto v0.42.0 // indirect
golang.org/x/net v0.43.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/text v0.29.0 // indirect
google.golang.org/protobuf v1.36.5 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
Expand Down
Loading
Loading