https://prefect.io logo
Title
a

Andreas

07/06/2022, 10:38 AM
Hi! In Prefect 2.0, when creating a flow_run for a deployment using API's
prefect.client.create_flow_run_from_deployment()
is it possible to set the name for the flow_run? I know that there is such an option when calling
create_flow_run(name="My flow run name")
that takes as input a flow_model, what about when creating a run from a deployment though?
1
a

Anna Geller

07/06/2022, 11:01 AM
In theory, it is possible but we currently don't expose any functionality to do that. Let me open an issue to check if we can expose that @Marvin open "Allow setting custom flow run name when creating a flow run from a deployment"
❤️ 1
m

Marvin

07/06/2022, 11:02 AM
a

Andreas

07/06/2022, 11:27 AM
I noticed in the source code that
prefect.client.create_flow_run_from_deployment()
uses
DeploymentFlowRunCreate
which is a subclass of
FlowRun
that has the 'name' attribute, so indeed exposing this functionality is possible. Thank you Anna😊
🙌 1