https://prefect.io logo
Title
a

Andy Yeung

12/08/2022, 1:35 AM
Hi, I am new in prefect 2, we are trying to do migration from prefect 1 to 2. The tree diagram is redesigned to represent by the radar diagram. I would like to see how can I interpret the execution sequence in the diagram. I have the flow defined like below in sequential execution order, but it looks like it doesn’t display in particular order on the radar diagram. Or is it just a side effect when I try to execute the flow locally and view it in local orion?
1
:hard-same: 1
t

Tim Galvin

12/08/2022, 3:40 AM
To me it looks like all your tasks in your code are independent from one another. There is nothing linking any type of dependency between them. Since you are not using a
.submit
method for your tasks, they will execute sequentially, in a blocking type manner. This is why to you your flow is probably working. Each shell in the radar figure represents a level of dependency. Task B that relies on Task A would be on shell 1, Task C that relies on Task B would be on shell 2 etc. Since you have no dependencies between tasks, they are all on shell 1
🙌 1
a

Andy Yeung

12/09/2022, 3:14 AM
In prefect 1 we are using the set_up_stream to indicate the dependency. When we check prefect 2, it looks like it is more preferred to use code as workflow for more readability. “There. is nothing linking” does it mean the dependency will only be set when we need to past the output from an action to another input of action? Our situation is that because we already persist each step output in DB and storage. So we don’t need to pass the output of one action to another
t

Tim Galvin

12/09/2022, 5:27 AM
There is now a
wait_for
option available in the
.sumbit
method
So you can instruct it to wait for a task to complete in a similar manner to wait it sounds like you were doing previously
Otherwise, your understanding of passing around variables to build the dependency is correct
m

Matthew Ferry

12/14/2022, 12:50 PM
I'm having the same issue, but I don't want or need to pass variables between steps. Does this
wait_for
syntax yield the sequential dependencies in a radar graph? https://docs.prefect.io/concepts/tasks/?h=dependency#wait-for
t

Tim Galvin

12/15/2022, 1:02 AM
I have not personally confirmed it, but it makes sense to me that it would