Skip to content

Fix/pending status phases#1244

Closed
zhangjaycee wants to merge 8 commits into
alibaba:release/v1.10from
zhangjaycee:fix/pending-status-phases
Closed

Fix/pending status phases#1244
zhangjaycee wants to merge 8 commits into
alibaba:release/v1.10from
zhangjaycee:fix/pending-status-phases

Conversation

@zhangjaycee

Copy link
Copy Markdown
Collaborator

close #1238

zhangjaycee and others added 8 commits July 7, 2026 09:53
… state advances (alibaba#1217)

RayOperator never overrode AbstractOperator.get_remote_status (which
returns empty ServiceStatus), causing _try_advance_archiving to never
see completion.  Add the override that delegates to the module-level
rocklet_probe.get_remote_status, and keep SandboxManager calling
through self._operator for consistency.
…tainers (alibaba#1207)

On customized Alpine images with a corrupted APK database, `apk add bash`
returns a non-zero exit code even though bash is already installed. Combined
with `set -o errexit`, this causes docker_run.sh to exit before installing
the glibc compatibility layer or starting rocklet.
* feat(k8s): transport image auth to k8s

* feat(admin): fix some cr

* feat(k8s): fix some xxx
…libaba#1203)

* docs: add OpenSandbox operator implementation plan and SDK contract

Phase 0 deliverables for adding OpenSandboxOperator as a Rock backend
(方案 B: delegate lifecycle + exec/file ops to OpenSandbox via its Python SDK).

refs alibaba#1202

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(config): add OpenSandboxConfig for opensandbox operator backend

Adds OpenSandboxConfig dataclass (endpoint/api_key/protocol/runtime/
namespace/use_server_proxy/default_timeout), wires it into RockConfig and
RockConfig.from_env yaml parsing. Enables runtime.operator_type=opensandbox.

refs alibaba#1202

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(operator): add OpenSandboxOperator lifecycle backend

Implements 方案 B Phase 1 (lifecycle seam) for using OpenSandbox as a Rock
backend via its Python SDK:

- OpenSandboxClient: async facade over opensandbox.Sandbox with lazy SDK
  import (optional 'opensandbox' extra) and exception translation.
- OpenSandboxOperator(AbstractOperator): submit->create, stop->pause,
  restart->resume, delete->kill; state mapping and docker->k8s memory/cpu
  normalization; stores backend + opensandbox_id in extended_params.
- OperatorFactory: dispatch operator_type=opensandbox; OperatorContext gains
  opensandbox_config; admin main wires rock_config.opensandbox.
- pyproject: opensandbox optional extra.

Verified client calls against the installed opensandbox==0.1.13 SDK signatures.

refs alibaba#1202

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: mark OpenSandbox operator plan Phase 1 complete

refs alibaba#1202

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(admin): skip Ray init for opensandbox operator backend

The opensandbox backend delegates the full sandbox lifecycle to an external
OpenSandbox service, so admin no longer needs a local Ray cluster to boot with
operator_type=opensandbox. Adds operator_requires_ray() and gates
RayService.init() on it; GemManager already tolerates ray_service=None and the
lifecycle path dispatches through the operator. ray/k8s behavior unchanged.

refs alibaba#1202

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(operator): skip health check when connecting for status/pause/kill

Real end-to-end run against a live OpenSandbox server surfaced this: get_state
connected with the default health check, so a *paused* sandbox failed the check
and blocked ~ready_timeout, making get_status report the sandbox as gone (None)
instead of STOPPED. get_state/pause/kill only need a handle, so connect() now
passes skip_health_check=True. Verified e2e: paused sandbox now reads STOPPED.

refs alibaba#1202

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* refactor(operator): simplify operator_requires_ray to == ray

Per review: only the ray operator needs a local Ray cluster; k8s and
opensandbox both delegate the sandbox lifecycle to an external orchestrator, so
admin boots without Ray for them too. Replaces the ray-free allowlist with a
direct operator_type == 'ray' check.

refs alibaba#1202

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* build: move opensandbox dep into the admin extra

Per review: the opensandbox operator runs inside the admin service (deployed as
the admin cluster), so the SDK belongs in the admin extra rather than a separate
optional group. Drops the standalone opensandbox group and its 'all' entry.

refs alibaba#1202

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(config): default OpenSandboxConfig.use_server_proxy to False

Per review: server-proxy mode is not supported on all OpenSandbox deployments,
and False matches the SDK default. Only affects the execd (command/file) route
(Phase 2); the lifecycle path talks to the server directly regardless. Enable
explicitly in yaml when the target deployment supports it.

refs alibaba#1202

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs(config): add commented opensandbox section to rock-dev.yml

Shows where the opensandbox operator backend is configured on the admin side
(endpoint/api_key/protocol/use_server_proxy/...), sibling to ray:/k8s:. These
are admin deployment config, not Harbor job parameters.

refs alibaba#1202

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(operator): make OpenSandbox create robust against real deployments

Two issues surfaced by an end-to-end run against a real (Aone Sandbox) server
that a lenient local server hid:

1. Passing timeout=None explicitly sent a null duration the server rejects
   ("Provided duration string (nulls) is invalid"). Omit the timeout kwarg when
   unset so the SDK default (sandbox TTL) applies.
2. create() blocked on the SDK readiness health check (default 30s), which
   times out on a cold image pull or when the caller can't directly reach the
   sandbox. Pass skip_health_check=True so create() returns the id immediately —
   matching Rock's async lifecycle (submit -> PENDING, get_status polls RUNNING)
   and Harbor's own OpenSandbox environment.

refs alibaba#1202

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix: disable opensandbox stop restart by default

* fix: use direct OpenSandbox lifecycle APIs

* feat(operator): add OpenSandbox image registry prefix

* fix(operator): address OpenSandbox review feedback

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

5 participants