<@ULVA73B9P> Is it possible to set custom flow run...
# ask-marvin
m
@Marvin Is it possible to set custom flow run name if the flow is running on a schedule?
m
In Prefect 2.x, a flow run represents a single execution of the flow. You can customize the name of a flow run when you manually trigger it, for instance, by importing the flow into an interactive session and calling it. However, when using schedules to automatically create new flow runs for deployments, the documentation excerpts provided do not explicitly mention the ability to customize flow run names for each scheduled run. Since the documentation does not clearly state whether custom flow run names can be set for scheduled runs, I would suggest consulting the latest Prefect documentation or reaching out to the Prefect community for the most current information on whether this feature is supported and, if so, how to implement it. Would you like me to look for more information or assist with something else related to Prefect 2.x?
n
@Michał Wysocki something like this?
Copy code
@flow(flow_run_name="{foo}-{bar}")
def some_scheduled_flow(foo: str, bar: int):
m
I have that, but when I deploy it as
some_scheduled_flow.deploy(...., interval=xxx)
all the runs gets silly names
While
run_deployment()
(or manually invoking) works fine and sets my custom
flow_run_name
Actually, I take that back, somehow manual invocation also stopped naming them 🤔