ml-tooling / contaxy

MIT License
10 stars 8 forks source link

Fix service delation not deleting the named service volume, even if delete_volumes is set to true #55

Closed JNKielmann closed 2 years ago

JNKielmann commented 2 years ago

When deleting a service and requesting the deletion of its volumes via the delete_volumes parameter, the docker container remove API is called like this: container.remove(v=delete_volumes) From the docs for parameter v=true:

Remove anonymous volumes associated with the container.

This means named volumes are not automatically deleted by this call! This PR adds the missing logic for deleting all volumes associated with the service if delete_volumes is set to true.

Moreover, some missing imports for docker type definitions were added.

lgtm-com[bot] commented 2 years ago

This pull request introduces 1 alert when merging 90b0690b4e716f198ede2627843ddec130662a31 into e070d8554e860ab37f5df29b0f342e019a080c85 - view on LGTM.com

new alerts: