https://prefect.io logo
Title
h

Hans Lellelid

01/30/2023, 4:50 PM
Hey folks -- I had a question. I haven't tried this, but in looking at the API docs, it looks like it's possible to trigger a flow run with parameters without having to have that wrapped up in a Deployment. Under what conditions would it make sense to just trigger an adhoc flow run like this vs. having a full deployment? (For context, this is with locally-hosted Orion server/UI.) Currently we are using the API to create a flow run from a deployment.
z

Zanie

01/30/2023, 5:25 PM
You can create a flow run without having a deployment, that’s the route that we call when a flow is called interactively (i.e. not managed by an agent).
It won’t result in a run that an agent can execute.
h

Hans Lellelid

01/30/2023, 11:47 PM
Ah! Ok, that's helpful. So "no deployment" = "no agent running this" -- (it just runs on the server?)
z

Zanie

01/31/2023, 4:18 PM
“no deployment” == “reporting that a flow is running” rather than “scheduling a run for execution”
The server won’t execute flow runs 🙂
h

Hans Lellelid

01/31/2023, 4:39 PM
Sorry, I'm not sure I'm fully understanding this distinction 🙂 If triggering a flow run (without Deployment) via API, where would that flow run?
z

Zanie

01/31/2023, 7:40 PM
you aren’t triggering it, you are merely telling the API it exists
💡 1
i.e. this is what happens behind the scenes when you run a flow manually with
my_flow(...)
h

Hans Lellelid

01/31/2023, 8:11 PM
💡💡💡 Ahhh! Ok -- that really clarifies it, thank you! So it sounds like this really wouldn't be an API path you'd expect to be used externally.
z

Zanie

01/31/2023, 10:13 PM
You could use it to track a flow run you were manually orchestrating, but otherwise yeah I wouldn’t expect a user to call it 🙂
h

Hans Lellelid

02/01/2023, 12:42 AM
Ok, thanks again for your patience in clarifying this.