Hi,
If we delete a workflow in the Hub, all the deployments that were created from that workflow will not be deleted automatically.
Is this a design choice? I understand the benefit it can bring in case the deleted workflow is uploaded again (i.e. no need to recreate the deployments), but on the other hand it provoke the situation of having several orphaned and unnecessary deployments, which will exist on the Hub but won’t work.
Just wanted to double check: is this expected?
Thanks.
Hi @misterhd ,
Thanks for bringing this up.
Yes, this is a design choice, but unfortunately it isn’t a fully realized design, yet.
We want to decouple deployments and workflows. This allows you to work on existing workflows, adding new features, running tests etc., while the deployment(s) in production remain unaffected.
This can even go as far as a deployment still existing after a workflow was (accidentally) deleted.
As it stands now, we still have a dependency such that deleting a workflow renders the deployments unusable.
In the future, we want to improve this, but your feedback is still very valid and we will need to think carefully how we can implement convenience features such as automatically cleaning up any deployments on workflow deletion when desired.
I hope this clarifies things. For the time being, though, we can possibly offer workarounds, e.g. having a Trigger Deployment, which is run/triggered when spaces are updated (workflows deleted), which can then likely check for existing deployments of the workflow and delete them.
(Disclaimer, I haven’t actually built such a workflow yet, but I think this is possible.)
Kind regards
Marvin
I haven’t tested thoroughly, but the attached workflow (and deployment configuration) seems to do the trick.
- As this workflow will delete deployments, please use at your own risk.
- The workflow needs to be deployed for each team that wants to make use of the automated deployment deletion on workflow deletion.
Deployment Cleaner.knwf (96.2 KB)