https://prefect.io logo
#prefect-community
Title
# prefect-community
m

Mansour Zayer

08/02/2022, 8:50 PM
Hello. In Prefect 1: Context: we have a flow of flows, and to manage dependencies, we have 2 solution. Either make sure the infra registers the flows in order, or to import and register the underlying flows in the flow-of-flows. What could go wrong if you do register a flow in the flow-of-flows like
Copy code
from underlying_flows.flow_a import flow_a

flow_a.register(project...)

With Flow(...):
    ...
Because when we do that, prefect throws a warning
UserWarning: Attempting to call "flow.register" during execution of flow file will lead to unexpected results.
👀 1
b

Bianca Hoch

08/02/2022, 9:20 PM
Hello Mansour, thank you for reaching out. I'm not 100% sure what could go wrong with registering a flow in a flow of flows like that (although I am sure one of my colleagues knows), but I can point you in the direction of this helpful article which shows how to schedule a flow-of-flows and managing their dependencies.
m

Mansour Zayer

08/02/2022, 9:25 PM
Thanks for the reference. However, my concern is registering the flows. This article starts after the flows are registered. When you have your infra-as-code in Terraform, managing the process of how to register flows becomes an important part to ensure everything works in all environments and regions.
b

Bianca Hoch

08/03/2022, 10:52 PM
Hello Mansour, thank you for clarifying. If you haven't done a significant amount work in 1.0, I would recommend using 2.0 for this very reason. It's much easier to construct a flow of flows, without having to register the individual child flows separate from the parent flow (the process of registration isn't even necessary in 2.0).
👍 1
4 Views