cuddly-jelly-27016
05/15/2025, 12:11 AM.with_overrides(node_name="foo"). This is useful for dynamic tasks especially, because they get cryptic identifiers such as d1-n-dn0 by default, making it difficult to see in the UI for what iteration a dynamically created task is running.
If multiple sub-tasks are created, the name override works initially for all tasks, but then fails for any tasks after the initial one.
### Expected behavior
Overridden task names are visible throughout in the UI.
### Additional context to reproduce
from flytekit import Resources, WorkflowFailurePolicy, dynamic, task, workflow
@task(
limits=Resources(mem="500Mi"),
)
def some_task(
val: str,
):
print(val)
@dynamic(limits=Resources(mem="500Mi"))
def base_workflow():
# set up task promises
for val in ["one", "two", "three"]:
task_some_task = some_task(
val=val,
).with_overrides(node_name=f"{val}-some-task")
task_some_other_task = some_task(
val=val,
).with_overrides(node_name=f"{val}-some-other-task")
task_some_task >> task_some_other_task
@workflow( failure_policy=WorkflowFailurePolicy.FAIL_AFTER_EXECUTABLE_NODES_COMPLETE,
)
def wf():
base_workflow()
### Screenshots
[image](https://private-user-images.githubusercontent.com/4107738/252986587-0cc68ed4-fc61-4d7e-b305-8aa1ca9896e1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDcyNjgxNjUsIm5iZiI6MTc0NzI2Nzg2NSwicGF0aCI6Ii80MTA3NzM4LzI1Mjk4NjU4Ny0wY2M2OGVkNC1mYzYxLTRkN2UtYjMwNS04YWExY2E5ODk2ZTEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDUxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTA1MTVUMDAxMTA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTU1MDUwNzJmZjdhZTI2NzY1MTBlNTc2NWZjYzI4ZmVjNmYxODgzYWYyMmZjOGUxOTk2ZWVjMTNiMWI1MDM4MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.jggio0W5_8T3E4LADKDWuwEJZzw6RnzhRnaxI0T9pTc)
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
05/15/2025, 12:11 AM