You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am doing some spike work on migrating our flows from v2.19 to v3.0. In doing this, I have found what appears to be a bug with callabe task name generators. I often use task vars (more specifically, values in a task dictionary arg) for naming task threads. This is essential in making sense of complex graphs including dozens, if not hundreds of mapped tasks. I often name the task run based on a value such as a table name during ETL processes; thus it would be more of a hassle to gauge impact of failed tasks when they are named by thread ID instead.
It seems that prefect.runtime.task_run may not be properly awaiting task args
The error I am seeing with my callable name generator (which works in Prefect v2.19): TypeError: 'PrefectConcurrentFuture' object is not subscriptable
A much more generic error is also printed during these flow failures:
Please wait for all submitted tasks to complete before exiting your flow by calling `.wait()` on the `PrefectFuture` returned from your `.submit()` calls.
Example:
from prefect import flow, task
@task
def say_hello(name):
print(f"Hello, {name}!")
@flow
def example_flow():
future = say_hello.submit(name="Marvin")
future.wait()
example_flow()
Here is a simple flow which replicates my problem:
Bug summary
I am doing some spike work on migrating our flows from v2.19 to v3.0. In doing this, I have found what appears to be a bug with callabe task name generators. I often use task vars (more specifically, values in a task dictionary arg) for naming task threads. This is essential in making sense of complex graphs including dozens, if not hundreds of mapped tasks. I often name the task run based on a value such as a table name during ETL processes; thus it would be more of a hassle to gauge impact of failed tasks when they are named by thread ID instead.
The error I am seeing with my callable name generator (which works in Prefect v2.19):
TypeError: 'PrefectConcurrentFuture' object is not subscriptable
A much more generic error is also printed during these flow failures:
Here is a simple flow which replicates my problem:
Version info (
prefect version
output)Additional context
No response
The text was updated successfully, but these errors were encountered: