The goal is to create different deployments with different schedules and parameters by updating the yaml, bypassing the GUI. Is that possible?
I tried to run prefect deploy -n test_dep, but the yaml gets overwritten, deleting the parameters (I could not find how to correctly define them).
Thank you very much for the help.
p.s.: I tried using API and i could made it by creating deployment_n.json, but i need to create a flow to have an ID associated, otherwise it returns foreign key error.
This has a direct solution, as one of the prefect cli flags prevents overwrite of the file. I use this pattern in my own projects, with a --prefect-file flag and the global flag ‘prefect --no-prompt’
Thank you merlin for the response, but the problem is it overwrites because it doesn’t recognize the parameters. Even with no prompt, the parameters are not set correctly in the deployment.
The command you use, deploy all the deployments written in the specified path of the prefect.yaml . The problem in my case is that when I do it, it does not set the flow parameters. Any change to them doesn’t affect the deploy.
I tried also serving directly from flow doing run_test.serve(parameters= my_dict_parameters), but there must be another simpler solution, since in this case i have to load a different dict/json/yaml every serve…