From e95241b94fb6dffff110fa60eee3c8803a784b5b Mon Sep 17 00:00:00 2001 From: Harry Date: Wed, 28 Jan 2026 19:50:56 +0800 Subject: [PATCH] fix: command node --- api/core/app_assets/builder/skill_builder.py | 1 + api/core/workflow/nodes/command/node.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/api/core/app_assets/builder/skill_builder.py b/api/core/app_assets/builder/skill_builder.py index 702857e9e2..5a98e03672 100644 --- a/api/core/app_assets/builder/skill_builder.py +++ b/api/core/app_assets/builder/skill_builder.py @@ -30,6 +30,7 @@ class _CompiledSkill: content_bytes: bytes +# FIXME(Mairuis): move the logic into sandbox class SkillBuilder: _nodes: list[tuple[AppAssetNode, str]] _max_workers: int diff --git a/api/core/workflow/nodes/command/node.py b/api/core/workflow/nodes/command/node.py index 9e7d686f4e..bf9b2090e4 100644 --- a/api/core/workflow/nodes/command/node.py +++ b/api/core/workflow/nodes/command/node.py @@ -3,6 +3,7 @@ from collections.abc import Mapping, Sequence from typing import Any from core.sandbox import sandbox_debug +from core.sandbox.bash.session import SANDBOX_READY_TIMEOUT from core.virtual_environment.__base.command_future import CommandCancelledError, CommandTimeoutError from core.virtual_environment.__base.helpers import submit_command, with_connection from core.workflow.enums import NodeType, WorkflowNodeExecutionStatus @@ -73,6 +74,7 @@ class CommandNode(Node[CommandNodeData]): timeout = COMMAND_NODE_TIMEOUT_SECONDS if COMMAND_NODE_TIMEOUT_SECONDS > 0 else None try: + sandbox.wait_ready(timeout=SANDBOX_READY_TIMEOUT) with with_connection(sandbox.vm) as conn: command = ["bash", "-c", raw_command]