<@ULVA73B9P> - If I deploy a flow and give it a na...
# ask-marvin
k
@Marvin - If I deploy a flow and give it a name, and then in my actual flow code I pass a
name
to the
@flow
decorator, what happens if the names are different?
m
When deploying a flow in Prefect 3.x, the name you give to the deployment and the name specified in the
@flow
decorator can be different. The deployment name is used as a unique identifier for triggering runs and managing the deployment, while the
@flow
decorator name is used to identify the flow within your code. Here's what happens if the names are different: - Deployment Name: This is used for managing and triggering the deployment. It doesn't have to match the flow name, but it must be unique for that flow ID. - Flow Name in Decorator: This is used within your code to refer to the flow. It can be different from the deployment name and is more about the logical identification of the flow in your application. In essence, the deployment name and the flow name in the decorator serve different purposes and can coexist without conflict, each being used in their respective contexts. For more details, you can explore the Prefect deployment documentation.