Garden-AI / garden

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

Extract metadata.json from built container as a file instead of `cat`ting its contents #416

Closed WillEngler closed 5 months ago

WillEngler commented 5 months ago

Might close #414

Overview

We think that there is a bug on certain computers where stdout is not properly captured in the following line:

container_stdout = client.containers.run(
        image=image.id,
        entrypoint="/bin/sh",
        command=["-c", "cat /garden/metadata.json"],
        remove=True,
        detach=False,
    )

The Gardeners can't reproduce the bug, but we want to try circumventing stdout altogether to see if that fixes it. To do this we'll extract a file from the container instead of catting the file contents.

Discussion

Testing

I updated the unit test and I did manual runs to confirm it still works

Documentation

No


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

codecov-commenter commented 5 months ago

Codecov Report

Attention: Patch coverage is 96.29630% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 76.22%. Comparing base (5968c10) to head (9f64ebc). Report is 1 commits behind head on main.

Files Patch % Lines
garden_ai/containers.py 93.75% 1 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 #416 +/- ## ========================================== + Coverage 76.08% 76.22% +0.14% ========================================== Files 46 46 Lines 2789 2810 +21 ========================================== + Hits 2122 2142 +20 - Misses 667 668 +1 ```

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