Merge pull request #369 from SuanmoSuanyangTechnology/fix/workflow-publish

fix(workflow): avoid in-place mutation of operation dict during loop node validation
This commit is contained in:
Mark
2026-02-09 15:46:27 +08:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
验证工作流配置的有效性,确保配置符合规范。
"""
import copy
import logging
from typing import Any, Union, TYPE_CHECKING
@@ -114,6 +115,7 @@ class WorkflowValidator:
>>> is_valid
True
"""
workflow_config = copy.deepcopy(workflow_config)
errors = []
graphs = cls.get_subgraph(workflow_config)

View File

@@ -1488,7 +1488,7 @@ class AppService:
is_valid, errors = WorkflowValidator.validate_for_publish(config)
if not is_valid:
raise BusinessException("应用缺少有效配置,无法发布", BizCode.CONFIG_MISSING)
raise BusinessException(f"应用缺少有效配置,无法发布, errors:{','.join(errors)}", BizCode.CONFIG_MISSING)
logger.info(
"应用发布配置准备完成"
)