Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
shydefoo opened this issue Aug 8, 2024 · 2 comments · May be fixed by flyteorg/flyteconsole#887
Open
2 tasks done
Assignees
Labels
backlogged For internal use. Reserved for contributor team workflow. bug Something isn't working

Comments

@shydefoo
Copy link

shydefoo commented Aug 8, 2024

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
@shydefoo shydefoo added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Aug 8, 2024
Copy link

welcome bot commented Aug 8, 2024

Thank you for opening your first issue here! 🛠

Copy link

runllm bot commented Aug 8, 2024

The issue you're encountering with the Flyte UI showing a TypeError when using approve in a dynamic workflow with overridden node names is likely related to known limitations and bugs in handling node name overrides, especially in dynamic contexts. According to this discussion and this GitHub issue, long node names or specific characters in node names can cause unexpected behavior in the Flyte UI.

To avoid this issue, you can either:

  1. Avoid using underscores in node names, as they are known to cause issues (source).
  2. Keep node names under 20 characters to prevent them from being hashed (source).

Would you like more details on how to handle node name overrides or any other aspect of Flyte?

Sources:


This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.

Mention @RunLLM to ask follow-up questions. See runllm.com for more!

@eapolinario eapolinario added backlogged For internal use. Reserved for contributor team workflow. and removed untriaged This issues has not yet been looked at by the Maintainers labels Aug 8, 2024
@xwk1246 xwk1246 linked a pull request Oct 14, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlogged For internal use. Reserved for contributor team workflow. bug Something isn't working
Projects
Status: Assigned
Development

Successfully merging a pull request may close this issue.

3 participants