do not delete cache when running task v2 while workflow is being updated (#3586)

This commit is contained in:
Shuchang Zheng
2025-10-01 17:00:35 -07:00
committed by GitHub
parent d6332e65be
commit f43467c2fd
2 changed files with 6 additions and 1 deletions

View File

@@ -924,6 +924,7 @@ class WorkflowService:
title: str | None = None,
description: str | None = None,
workflow_definition: WorkflowDefinition | None = None,
delete_script: bool = True,
) -> Workflow:
if workflow_definition:
workflow_definition.validate()
@@ -947,7 +948,8 @@ class WorkflowService:
# Check if workflow definition changed and delete published workflow scripts if so
if (
workflow_definition
delete_script
and workflow_definition
and previous_workflow
and organization_id
and _get_workflow_definition_without_dates(previous_workflow.workflow_definition)
@@ -1849,6 +1851,7 @@ class WorkflowService:
organization: Organization,
request: WorkflowCreateYAMLRequest,
workflow_permanent_id: str | None = None,
delete_script: bool = True,
) -> Workflow:
organization_id = organization.organization_id
LOG.info(
@@ -2094,6 +2097,7 @@ class WorkflowService:
workflow_id=workflow.workflow_id,
organization_id=organization_id,
workflow_definition=workflow_definition,
delete_script=delete_script,
)
LOG.info(
f"Created workflow from request, title: {request.title}",

View File

@@ -812,6 +812,7 @@ async def run_task_v2_helper(
organization=organization,
request=workflow_create_request,
workflow_permanent_id=workflow.workflow_permanent_id,
delete_script=False,
)
LOG.info("Workflow created", workflow_id=workflow.workflow_id)