Hello. I'm using Prefect 2.3.2. I would like to ...
# prefect-community
s
Hello. I'm using Prefect 2.3.2. I would like to choose the name for each of my flow runs (not use the adjective-noun default) so that they are easier to search for in the Orion UI. I am processing images, and would like to name each flow run after its corresponding image. I am not currently using Agents or Deployments or Queues, just importing prefect into python scripts to help organize pipeline code and get each retries and convenient logging. I there a way that I can choose the flow run name when my flow is called? I have tried OrienClient.create_flow_run, but this seems to depend on using agents/deployments. Is there (or could there be) a simpler way I can do this directly when a new flow run starts?
1
a
Hi Scott, great question! I'm pretty sure there is some GitHub issue for it but I couldn't find it immediately. I can raise it internally, though - definitely providing custom run names e.g. based on some callable, would be in scope, but I'll ask. Until then, the UI already shows the flow name before the flow run name in the Flow Runs list, see the first image Also you can see flow name in the 2nd image
s
Thanks Anna! If you stumble across that GitHub issue for this please share it here so I can follow.
o
s
@Anna Geller I don't think this ^ will solve my problem. I am not using any deployments, agents, or queues. I have a job deployed to kubernetes that is triggered by pubsub messages. When a new message comes in, a new flow is run. I want to use prefect to organize my pipeline and orion to easily see its status for each new message/image the pipeline is expected to process. In prefect 1.0 it looks like that can be done with a state_handler https://github.com/PrefectHQ/prefect/discussions/3881 or https://discourse.prefect.io/t/how-can-i-set-a-custom-flow-run-name-instead-of-using-the-randomly-generated-adjective-noun-combination/131 Is there an equivalent approach for Prefect 2.0?
a
that's an implementation detail, you should treat the issue more as a description: "as a user, I'd like to set custom flow run names"
s
I see. I am in the right place to raise this implementation request? If not, can you point me to the right place?
a
I already modified the title on this issue but feel free to add comments https://github.com/PrefectHQ/prefect/issues/5968
gratitude thank you 1