Closed vsoch closed 4 years ago
Thanks @vsoch! Overwriting the container works, but I noticed that if I click the 'delete container' button in the sregistry web interface, the container is not removed in minio. I'm not sure if I should file a separate issue for this, just let me know.
Oup that's a bug! Let me fix it and add to this current PR.
okay @RonaldEnsing I've made a shared function to handle the delete! I tested locally and it seems to work - one testing issue I ran into is forgetting to refresh the collection view after adding / re-writing a bunch of containers with continued pushes, so when I clicked the delete button it returned 404 (because the id had changed) so just make sure to refresh before you do that :)
The container is now removed successfully. Thanks @vsoch!
Definitely! Let's squash and merge and get this show on the road! Thanks again for your patience!
This pull request will to a check to see if a previously referenced image file has changed, and delete it if this is the case. This will close #318.
@RonaldEnsing I anticipated an issue of a user uploading the same container to multiple collections (with different name/tag) and so I'd like to get your feedback on this. What I do before the delete is a query to make sure there indeed is only one of the container:
Also note there is a settings variable
DISABLE_MINIO_CLEANUP
with default false that the user can control. When you get a chance, please take a look and test it out! I've also done some pyflakes linting to cleanup unused imports.Signed-off-by: vsoch vsochat@stanford.edu