Hello,
When we build a deployment, the deployment gets the name of either the function that starts the flow, or the flow name argument in the function itself. But it doesn't take the deployment name itself that we specify with the
--name
argument, and there isn't an argument to specify the flow name in the CLI (unless we do it by hand after the creation of the file). I believe that's not a good behaviour since it complicates managing lot of flows.
For instance let's assume we have this structure:
- Flows
--| - flow_1.py
--| - flow_2.py
If both files look like this
@task
def test_task():
return 'hello'
@flow
def main():
message = test_task()
print(message)
if __name__= '__main__':
main()
The flow name in the yaml file will be the same (main), and that will put confusion on the prefect UI. As we'll have the same flow but with different deployment names, but it's not the same flow code under the hood.
Is there a better way to handle this apart from changing the name after the creation of the yaml file ?