from flytekit import task, workflow, dynamic
from flytekit import approve
from datetime import timedelta
from typing import List
@task
def review(v: int) -> str:
return f"testing {v}"
@workflow
def subworkflow(v: int):
t1 = review(v=v)
approve(t1, "title-input", timeout=timedelta(hours=1))
@dynamic
def my_workflow_dynamic(int_list: List[int]):
for i in int_list:
subworkflow(v=i).with_overrides(node_name=f"subworkflow_{i}")
@workflow
def my_workflow(int_list: List[int]):
my_workflow_dynamic(int_list=int_list)
if __name__ == "__main__":
my_workflow()
Describe the bug
Summary
TypeError: Cannot read properties of undefined (reading 'id')when subworkflow node_name is overriddensubworkflow(v=i).with_overrides(node_name=f"subworkflow_{i}")to justsubworkflow(v=i)Expected behavior
Additional context to reproduce
Sample code to reproduce example:
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?