ContainerCodeExecutor reports silent nonzero exits as successful execution
メンテナーはふだん 3 日以内に返信
評価
この issue はまだ評価されていません。
説明
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.
- 主要言語
- Python
- スター
- 22.3k
- フォーク
- 4.4k
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google/adk-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
google/adk-python#8360 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
google/adk-python#8359 ·
メンテナーはふだん 3 日以内に返信
-
Can pin to litellm version be changed?対応中かも @llalitkumarrr が 10 日前に担当しました。 オープンmodels
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
google/adk-python#8129 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
OpenAPI tools ignore operation- and path-level server overrides対応中かも @sanketpatil06 が 14 日前に担当しました。 オープンtools
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
google/adk-python#8064 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
Two docstrings in openapi_tool document parameters the signatures do not accept対応中かも @surajksharma07 が 17 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
google/adk-python#8024 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
google/adk-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
vllm-project/vllm#70030 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TigreGotico/tugaphone#408 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
gke-labs/kube-agents#7308 ·
メンテナーはふだん 1 日以内に返信
-
t: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 3 日以内に返信
-
chore
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
lugassawan/swe-workbench#841 ·