fix(workflow): avoid in-place mutation of operation dict during loop node validation
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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(
|
||||
"应用发布配置准备完成"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user