https://prefect.io logo
Title
s

Samuel Hinton

01/27/2023, 10:15 AM
Hey team! I was wondering if there are any recommended best practises for how to name flows/deployments? Currently if we have a flow named
test_flow_1
then we’d call our deployment
test_flow_1/test_flow_1_deployment
which is a bit redundant. Is it recommend to have unique deployments names? Will there be any issues if we have many deployments named the same thing
t

Tim-Oliver

01/27/2023, 10:28 AM
I call them
default
.
s

Samuel Hinton

01/27/2023, 11:23 AM
Cant fault how clean that would be!
c

Christopher Boyd

01/27/2023, 1:47 PM
there’s no issue other than your own sanity and ensuring it’s understood later. The flow itself can be run locally so the name makes sense, but once packaging on a deployment, it adds other element like the storage block, the infrastructure, the schedules, etc. so you could consider it like a complete package, while the flow is just one piece of that (albeit the important one)
test_flow_1
/`test_flow_1_deployment` is slightly redundant I can understand, but it is uniquely qualified with flow/deployment
👍 1
r

Rachel H

04/25/2023, 9:17 PM
Just to reiterate this for my understanding, we are currently deploying flows to multiple environments in a single workspace and so we've decided to call our flows
flow_1/dev
and
flow_2/dev
. We're counting on the deployments to still be unique with the name structure
flow/deployment
, but is there anything I should be concerned with when having multiple flows with the same "deployment_name"?
z

Zanie

04/25/2023, 11:32 PM
No repeated deployment names are fine.
We expected them to be used as dev/prod/etc
😯 1
:thank-you: 1
a

Avinash Santhanagopalan

04/26/2023, 4:02 PM
I think I am experiencing some kind of bug with deployment names. We have the same kind deployment that has different parameters in different agent pools. So we named this deployment run_{work_pool}_extraction. But every new deployment keep overwriting the old one and it uses flow_name/flow_name instead of using the parameterized deployment name. This line seems to not be having any effect https://github.com/PrefectHQ/prefect/blob/70ca8f1e7ba19fc0bda1fc0bde0b02572964be30/src/prefect/deployments.py#L763 possibly due to using both self and @classmethod in the same class
1