Auto-sanitize workflow YAML block labels and import references (#4654)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Suchintan
2026-02-06 11:59:04 -05:00
committed by GitHub
parent dca4186659
commit fe9324a86b

View File

@@ -1004,6 +1004,8 @@ async def update_workflow(
try:
if data.yaml_definition:
workflow_json_from_yaml = yaml.safe_load(data.yaml_definition)
# Auto-sanitize block labels and update references for imports
workflow_json_from_yaml = sanitize_workflow_yaml_with_references(workflow_json_from_yaml)
workflow_definition = WorkflowCreateYAMLRequest.model_validate(workflow_json_from_yaml)
elif data.json_definition:
workflow_definition = data.json_definition