feat: add early Docker validation in SandboxManager.start_async()#542
Merged
dengwx2009 merged 6 commits intoalibaba:masterfrom Mar 2, 2026
Merged
Conversation
Adds _validate_deployment_prerequisites() method that checks Docker availability before submitting to the operator, preventing wasted Ray actor allocation when Docker daemon is not running.
91b9c71 to
18d65f9
Compare
Mark tests in ray_service, docker_deployment, ray_operator, sandbox_http_proxy, sandbox_manager, and sandbox_proxy that require Docker with @pytest.mark.need_docker so they are auto-skipped when Docker is unavailable.
51c3bb8 to
e55109f
Compare
zhongwen666
pushed a commit
to zhongwen666/ROCK
that referenced
this pull request
Mar 3, 2026
…ibaba#542) * chore: add .worktrees/ to .gitignore * feat: register need_docker pytest marker * feat: add pytest_collection_modifyitems hook to auto-skip need_docker tests * feat: add need_docker marker to Docker-dependent sandbox manager tests * feat: add early Docker validation in SandboxManager.start_async() Adds _validate_deployment_prerequisites() method that checks Docker availability before submitting to the operator, preventing wasted Ray actor allocation when Docker daemon is not running. * feat: add need_docker marker to additional Docker-dependent tests Mark tests in ray_service, docker_deployment, ray_operator, sandbox_http_proxy, sandbox_manager, and sandbox_proxy that require Docker with @pytest.mark.need_docker so they are auto-skipped when Docker is unavailable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SandboxManager.start_async()before allocating Ray actor resources, failing fast withBadRequestRockErrorif Docker is unavailableneed_dockerpytest marker and addpytest_collection_modifyitemshook to auto-skip Docker-dependent tests when Docker daemon is not runningTest plan
test_start_async_raises_when_docker_unavailablepasses (mocks Docker as unavailable)need_dockermarked tests are auto-skipped when Docker is not availableuv run pytest -m "not need_ray and not need_admin and not need_admin_and_network" --reruns 1🤖 Generated with Claude Code