https://prefect.io logo
Title
j

Jonathan Mathews

05/23/2022, 3:31 PM
Hi! I want to debug a flow-of-flows on my local machine, but the flow runs created using create_flow_run seem to be executing on my production Prefect Cloud environment. How do I ensure that these flow runs are all executed on my local machine?
k

Kevin Kho

05/23/2022, 3:32 PM
You can’t really because the task under the hood is an API call. Are you trying to unit test or you don’t want to use Cloud?
j

Jonathan Mathews

05/23/2022, 3:35 PM
ok thanks. I’m just trying to test in development locally before pushing to production
So maybe there’s a better way of setting that up
c

Chris L.

05/23/2022, 4:30 PM
My team and I are testing local flow of flows by wrapping the flow around a small task: @task def create_local_flow(flow, params=None): state = flow.run(params=params) return state This can be used just like create_flow_run provided by Prefect library.
Really simple solution and works well
j

Jonathan Mathews

05/23/2022, 4:52 PM
Great tip! Thanks Chris
🙌 1