Open
Description
Describe the current behavior
Currently the task runner gets initialized before we enter the flow run context. This means that if we're for example creating a Dask cluster, any logs about how the cluster was created (or fails to get created) do not get associated with the flow run and can't be viewed in the UI.
Describe the proposed behavior
It seems like a little tweak to the ordering here would be sufficient: as long as we call task_runner.__enter__
after FlowRunContext.__enter__
, any logs/events would propagated as expected which would make debugging Dask (and I assume Ray) cluster issues much simpler.
Example Use
No response
Additional context
No response