Garden-AI / garden

https://garden-ai.readthedocs.io
MIT License
16 stars 4 forks source link

`docker prune` command #403

Closed OwenPriceSkelly closed 5 months ago

OwenPriceSkelly commented 5 months ago

Closes #366

Overview

This implements the garden-ai docker prune command to delete any garden-related docker artifacts from the user's local machine.

Discussion

We'd been pretty fast and loose with creating containers / images on the user's machine, mostly because docker's layer caching let us get away with it. A lot of the legwork for this one involved testing/fixing mistakes I hadn't really noticed before, like that a failing build would leave intermediate containers behind even if a successful one wouldn't. Besides making the containers.py helper functions into better boyscouts, functionality hasn't changed significantly, we just tag everything now.

Testing

I tested throughout with my local docker install and updated the existing unit tests to cover some of the changes to how we call the docker sdk.

Documentation

Documented with the command help text but no other docs


📚 Documentation preview 📚: https://garden-ai--403.org.readthedocs.build/en/403/

codecov-commenter commented 5 months ago

Codecov Report

Attention: 35 lines in your changes are missing coverage. Please review.

Comparison is base (6006881) 75.32% compared to head (e626c9c) 75.28%. Report is 1 commits behind head on main.

Files Patch % Lines
garden_ai/app/docker.py 25.00% 12 Missing :warning:
garden_ai/containers.py 72.72% 12 Missing :warning:
garden_ai/app/notebook.py 67.64% 11 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #403 +/- ## ========================================== - Coverage 75.32% 75.28% -0.04% ========================================== Files 45 45 Lines 2614 2683 +69 ========================================== + Hits 1969 2020 +51 - Misses 645 663 +18 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.