fix empty cache_key_value for block run cache (#3610)

This commit is contained in:
Shuchang Zheng
2025-10-03 16:48:20 -07:00
committed by GitHub
parent ba78db3b70
commit b985b5d0a0

View File

@@ -61,10 +61,6 @@ async def get_workflow_script(
cache_key = workflow.cache_key or ""
rendered_cache_key_value = ""
if block_labels:
# Do not generate script or run script if block_labels is provided
return None, rendered_cache_key_value
try:
parameter_tuples = await app.DATABASE.get_workflow_run_parameters(
workflow_run_id=workflow_run.workflow_run_id,
@@ -73,6 +69,10 @@ async def get_workflow_script(
rendered_cache_key_value = jinja_sandbox_env.from_string(cache_key).render(parameters)
if block_labels:
# Do not generate script or run script if block_labels is provided
return None, rendered_cache_key_value
# Check if there are existing cached scripts for this workflow + cache_key_value
existing_scripts = await app.DATABASE.get_workflow_scripts_by_cache_key_value(
organization_id=workflow.organization_id,