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.
This pull request introduces 1 alert when merging 90b0690b4e716f198ede2627843ddec130662a31 into e070d8554e860ab37f5df29b0f342e019a080c85 - view on LGTM.com
new alerts:
1 for Module is imported with 'import' and 'import from'
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 parameterv=true
: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.