fix: require sandbox local runtime opt-in#3086
Open
wolfkill wants to merge 1 commit into
Open
Conversation
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
Fixes #3082.
This PR prevents the sandbox runtime factory from silently falling back to host-local execution when no container backend is available.
Changes:
SANDBOX_RUNTIMEtoautoinstead oflocal.automode, select Docker, Podman, or Nerdctl when available.SANDBOX_RUNTIME=localorRuntimeFactory.create(runtime_preference="local").react_parser.pyand its tests because the repository CI runs full-packagemake fmt-checkand those files were already blocking Python Code Quality Checks on current PR branches.Verification
PYTHONPATH=packages/dbgpt-sandbox/src .venv/bin/python -m pytest packages/dbgpt-sandbox/src/dbgpt_sandbox/sandbox/execution_layer/tests/test_runtime_factory.py -q-> 6 passedSANDBOX_RUNTIME=local PYTHONPATH=packages/dbgpt-sandbox/src .venv/bin/python - <<PY ... PY-> explicit local runtime created a session and executed harmless Python successfullyPYTHONPATH=packages/dbgpt-core/src .venv/bin/python -m pytest packages/dbgpt-core/src/dbgpt/agent/util/tests/test_react_parser.py -q-> 24 passedmake fmt-check-> passedPYTHONPATH=packages/dbgpt-sandbox/src .venv/bin/python -m compileall -q ...-> passedgit diff --check-> passed