Riccardo Tesselli
08/04/2022, 10:21 AMprefect deployment ls
to get only the deployment’s ids without the fancy drawing of the table? (it makes it difficult to parse the output to use with xargs
).
Then another thing, I’ve noticed that when doing prefect deployment apply
if the deployment already exists in the cloud, it doesn’t get updated. Is there a way to force the re-deployment of an existing one?Anna Geller
Is there a way to force the re-deployment of an existing one?yes, that's exactly what this command does and the reason why it's called apply rather than create -- you can think about it the same way as kubectl apply
Riccardo Tesselli
08/04/2022, 10:44 AMdeployements
which allows me to do:
ls deployments/*.yaml | xargs -I % poetry run prefect deployment apply %
but I’ve noticed that if a deployment exists in cloud, if I change the deployment file and do apply again it doesn’t get updated, so for that reason first I need to delete the deployments by doing
poetry run prefect deployment ls | egrep ${GUID_REGEX} -o | xargs -I % poetry run prefect deployment delete --id %
ls
command, then pass them to delete
commanddeployment apply
does NOT update a deployment if it already exists in cloudAnna Geller
Tim Helfensdörfer
08/04/2022, 2:25 PMimport_path
when we ran prefect deployment apply our-deployment.yaml
Anna Geller