Hamza Naanani
09/06/2022, 11:53 AM--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 ?Khuyen Tran
09/06/2022, 2:57 PMHamza Naanani
09/06/2022, 3:10 PMKhuyen Tran
09/06/2022, 3:16 PM@flow(name='main-1')
. It is a good practice not to have two flows with the same nameHamza Naanani
09/06/2022, 3:42 PMKhuyen Tran
09/06/2022, 3:58 PMdev
and prod
)?Hamza Naanani
09/07/2022, 12:56 PMKhuyen Tran
09/07/2022, 2:56 PM