ContainerCodeExecutor reports silent nonzero exits as successful execution
Maintainer thường phản hồi trong vòng 3 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
ContainerCodeExecutor returns exit_code=7 with empty stderr for a program such as import os; os._exit(7). Result conversion consequently emits OUTCOME_OK, and the code-execution flow resets its error retry count. Only timeout status 124 currently receives a synthesized diagnostic.
Expected: a nonzero process exit produces an execution error even without stderr, yielding OUTCOME_FAILED and consuming an error retry. Actual: silent nonzero exits appear successful. UnsafeLocalCodeExecutor already reports Code execution exited with status 7. for this input.
Offline reproduction
No Docker daemon, model, or credentials are required. Run this script with the ADK dependencies installed and PYTHONPATH=<checkout>/src:
from unittest.mock import MagicMock, patch
from google.adk.code_executors.container_code_executor import ContainerCodeExecutor
from google.adk.code_executors.code_execution_utils import CodeExecutionInput, CodeExecutionUtils
with patch('google.adk.code_executors.container_code_executor.docker') as docker:
container = docker.from_env.return_value.containers.run.return_value
container.exec_run.return_value = MagicMock(exit_code=0, output=(b'', b''))
container.get_archive.return_value = ([b''], {})
with ContainerCodeExecutor(image='offline-test') as executor:
container.exec_run.side_effect = lambda cmd, **kw: MagicMock(
exit_code=7 if cmd[0] == 'python3' else 0, output=(b'', b''))
result = executor.execute_code(None, CodeExecutionInput(code='import os; os._exit(7)'))
part = CodeExecutionUtils.build_code_execution_result_part(result)
print(result.exit_code, repr(result.stderr), part.code_execution_result.outcome.value)
Before fix: 7 '' OUTCOME_OK.
After fix: 7 'Code execution exited with status 7.' OUTCOME_FAILED.
Environment: macOS arm64, Python 3.11.17, ADK main (2.14.1). Docker transport is mocked; the real executor, result conversion, and flow are exercised by the regressions. Regression introduction is unknown.
- Ngôn ngữ chính
- Python
- Star
- 22.3k
- Fork
- 4.4k
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của google/adk-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
google/adk-python#8360 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
google/adk-python#8359 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Can pin to litellm version be changed?Có thể đã có người làm @llalitkumarrr đã nhận 10 ngày trước. Đang mởmodels
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
google/adk-python#8129 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
OpenAPI tools ignore operation- and path-level server overridesCó thể đã có người làm @sanketpatil06 đã nhận 14 ngày trước. Đang mởtools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
google/adk-python#8064 · 4 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Two docstrings in openapi_tool document parameters the signatures do not acceptCó thể đã có người làm @surajksharma07 đã nhận 17 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
google/adk-python#8024 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của google/adk-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vllm-project/vllm#70030 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TigreGotico/tugaphone#408 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
gke-labs/kube-agents#7308 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
t: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 3 ngày
-
chore
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
lugassawan/swe-workbench#841 ·