-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Remove docker_py usage and add docker_cli_wrapper.py #33
base: main
Are you sure you want to change the base?
Conversation
9ca5596
to
e453332
Compare
Found the problem with the print statements -- it was because of my docker_info function printing everything out, oops. Fixing some end to end tests / issues after migrating the code. Will update soon. |
352ee03
to
afe41c8
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #33 +/- ##
===========================================
- Coverage 76.49% 65.21% -11.29%
===========================================
Files 26 27 +1
Lines 2608 2823 +215
Branches 390 428 +38
===========================================
- Hits 1995 1841 -154
- Misses 452 835 +383
+ Partials 161 147 -14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@xalelax Thank you for helping with the docker info issue... Mocks confuse me so much haha. Will fix the rest of the failing tests (I think it's because i tried to remove the skip volume mount tests from the unit tests since I thought we were ready for that now, but might need some fine tuning or do in a separate PR) |
fb55fe6
to
7ff0d6a
Compare
0d71246
to
507f51e
Compare
8cea7bd
to
0350a01
Compare
Replace prune cache with build --no-cache Fix unit tests - needs_docker test failing Fix end to end tests and docker info Testing unit tesseract tests since it's so slow on my machine Switch from monkeypatched fixture to mocking actual method Fix unused import Reinsert mocked_docker fixture in test_needs_docker Fix args which were missed in refactor Fix run bug Fix end to end tests Handle empty docker result Fix linter Fixed end to end tests except one volume test Put the skip mounts back add arg to build tesseract Add short id to container Fix volume args Handle cases where underlying resources may have been cleaned up already Move all handling to update functions Restructure docker cli Update cli, engine, errors, and mocked Revert test changes
Return raw str Fix unit test again with updated container structure Fix logs return type and decode Fix log formatting and swap to serve in exampels test change to stdout Fix test_endtoend Fix test examples Reduce In prog Fix exit code FIX FINAL UNIT TESTS BLESSSS Prunes
Fix generate only
@angela-ko I had a closer look and fixed the issue with logging. I'll fix the remaining tests and smaller issues. In the meantime, please apply the following adjustments:
|
I had a brief look at the code + threads, and don't have much to add to this 👍 gj |
…esting for str function
Fixed issue with a singular docker image with multiple tags and handling of short id. Current unit tests fail only on github ci not locally so sorry about the incoming print statement spamming... |
Relevant issue or PR
Fixes #10
Also #8
Description of changes
docker_cli_wrapper.py
file that contains aDockerWrapper
class that is a custom python wrapper overdocker_cli
that mimics the interface ofdocker_py
. This wrapper only sees Tesseract related objects and not other docker objects.DockerWrapper
class has two subclasses,Container
andImage
.get_image
orget_all_images
call.container_id
toContainer
object that gets updated onget_container
orget_all_containers
callproject_id
to all the containers that are part of the projectdocker_client
with the newdocker_wrapper
, as well as any mentions of docker errors.teardown
function in cli has the most amount of changes as handling of--all
flag is moved to engine.teardown instead as we no longer need to filter through all the projects in docker and parse which ones belong to tesseract as ourDockerWrapper
class already knows all the projects that are Tesseract._display_container_meta
to_display_project_meta
as I think it's more fitting to the function since we are listing the metadata of all the containers in a project, aka the project's metadata.DockerWrapper
class (docker_compose_up,
docker_compose_down
,docker_buildx
)docker_buildx
is replaced with--no-cache
in the build callTesting done
Unit tests + Manually tested commands:
serve
build
ps
list
teardown
teardown --all
apidoc
Remaining issues:
[ ] test_needs_docker fails because I can't properly create the RuntimeError side effect no matter what format I've tried to trigger it in.
[ ] Log handling may be incorrect in buildx since I'm not sure if we are streaming the build error logs correctly or not
License
Signed-off-by
line.Developer Certificate of Origin
Signed-off-by: [Angela Ko] [email protected]