https://prefect.io logo
Title
k

Kei Fung Dennis Tai

09/09/2022, 2:36 PM
Hi prefect experts, I'm two days new since discovering prefect, I have a question about deployments. So If I understand correctly, unless I register a flow as a deployment, I can't trigger the flow in the orion UI Is that right? I saw docs that taught how to register a deployment (CLI or Python), but it looks like either method I can run multiple times and it will register the flow as deployments multiple times. Is there a way to create a file that simply "define" the list of deployments like flows does right now? Also how do I remove a deployment? is it through the orion UI only? Also, there seems to be no way to trigger a part of the flow (e.g. if the flow runs subflows 1,2,3,4,5 sequentially, there's no way to just run 3,4,5). Is that correct? Thanks!
1
s

Sahil Rangwala

09/09/2022, 2:51 PM
@Kei Fung Dennis Tai Hello! You would need to separate the flows into different deployments if they are running in different times. This would be the easiest way to add more control for your separate flows and see the interaction within the UI https://docs.prefect.io/concepts/deployments/#deployments-and-flows
j

James Sopkin

09/09/2022, 2:52 PM
Hi Kei, in order to trigger the flow from the UI, you would need to create a deployment. You could have flows runs triggered locally show up in the cloud ui, but you wouldn't be able to trigger it from the UI in that case. In regards to removing a deployment there is a command to delete deployments
prefect deployment delete
in versions 2.2+
👍 1
k

Kei Fung Dennis Tai

09/09/2022, 3:09 PM
Hi @Sahil Rangwala, So if I have a workflow that looks like:
data = pull_raw_data()
calc_1 = fn1(data)
calc_2 = fn2(data)
input2 = pull_input()
prediction_2 = pr_fn2(calc_2, input2)
report_1 = rp_fn1(calc_1)
report_2 = rp_fn_2(prediction_2)
If I update something for input2 and wanna trigger everything downstream, is it currently possible? Or do you recommend to just separate all these steps into their own flow/deployments?
Hi @James Sopkin, So either the CLI or the UI can delete a deployment. got it. If we do deployment via YAML with the deployment build command, can we copy and adjust an existing yaml file and then would prefect automatically pick it up? or do we have to register again? Also can we move those YAML file somewhere in a deployment folder?
j

James Sopkin

09/09/2022, 3:23 PM
Hi Kei, yes, you can copy and paste a deployment yaml and edit. You do need to run
prefect deployment apply
for each new deployment you create
🙌 1