Skip to content

[BUG] UI Issue when using approve in dynamic workflow when overriding node name #5642

@shydefoo

Description

@shydefoo

Describe the bug

Summary

  • Flyte UI shows TypeError: Cannot read properties of undefined (reading 'id') when subworkflow node_name is overridden
image
  • When clicking the resume button, this error message appears
image
  • This blocks the execution from resuming.
  • This was fixed by changing subworkflow(v=i).with_overrides(node_name=f"subworkflow_{i}") to just subworkflow(v=i)

Expected behavior

  • Pop up to approve should appear
image

Additional context to reproduce

Sample code to reproduce example:

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()

Screenshots

No response

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes

Metadata

Metadata

Assignees

Labels

backloggedFor internal use. Reserved for contributor team workflow.bugSomething isn't workingstale

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions