alibaba / alibaba/ROCK

[Feature] make startup_timeout configurable via SDK / YAML / Nacos

Open
#1,155 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
485
Forks
81
Avg merge
16h 12m
Merged PRs (30d)
8

Description

**Feature Category**
- [ ] Sandbox
- [ ] Actions
- [x] Deployments
- [x] SDK & API
- [ ] Envhub
- [ ] CLI
- [ ] Performance & Optimization
- [ ] Documentation & Examples

**Problem Statement**

`startup_timeout` controls the total budget for docker pull + wait-until-alive. Previously pull timeout was hardcoded to 600s and wait-until-alive to 85s, not configurable by SDK or admin. Large images need longer timeouts, while lightweight sandboxes prefer shorter ones.

**Proposed Solution**

Make `startup_timeout` configurable per-sandbox via SDK, and add admin-side default / min / max bounds via YAML and Nacos hot-reload (`SandboxLifecycleConfig`).

**Detailed Feature Description**

Three parameters in `lifecycle` config section:

| Parameter | Default | Semantics |
|-----------|---------|-----------|
| `default_startup_timeout_seconds` | 600 | Used when SDK does not set `startup_timeout` |
| `min_startup_timeout_seconds` | 600 | Floor — SDK values below this are raised |
| `max_startup_timeout_seconds` | 1800 | Ceiling — SDK values above this are capped |

Clamp logic: `final = clamp(sdk_value or default, min, max)`

YAML config (`rock-conf/rock-.yml`):
```yaml
lifecycle:
default_startup_timeout_seconds: 600
min_startup_timeout_seconds: 600
max_startup_timeout_seconds: 1800
```

Nacos hot-reload (top-level key, whole-object replacement):
```yaml
lifecycle:
default_startup_timeout_seconds: 600
min_startup_timeout_seconds: 300
max_startup_timeout_seconds: 3600
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Begin by locating SandboxLifecycleConfig and the SDK startup_timeout path; inspect rock-conf/rock-.yml and the Nacos reload handling. Done when SDK values are clamped between the configured bounds, defaults apply when omitted, and YAML and Nacos settings support the stated lifecycle parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.