-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
Current coverage is 93.58% (diff: 94.44%)
|
@@ -48,8 +47,7 @@ def build_cmd(target, version): | |||
raise shub_exceptions.BadParameterException( | |||
'Dockerfile is not found, please use shub-image init cmd') | |||
is_built = False | |||
for line in client.build(path=project_dir, tag=image_name): | |||
data = json.loads(line) | |||
for data in client.build(path=project_dir, tag=image_name, decode=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
decode
param was added to build
command in docker-py 1.3.0, to push
/pull
in 1.8.0, but works fine only since 1.10.0 version due to the bug; it explains picking docker-py>=1.10.0 version in extras.
line = line.strip() | ||
if line: | ||
yield line | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it doesn't make sense to try to split/strip a line and yield it again if the line is not string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can actually drop this workaround since issues was fixed in docker-py 1.10 docker/docker-py#1059 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
almost LGTM, check comments
], | ||
extras_require={'docker-py': ['docker-py>=1.10.0']}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why extras, it's not an optional dependency for shub-image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I was beat out of reason when seeing a check for docker-py here.
We don't need this check then, do we? Dropped.
line = line.strip() | ||
if line: | ||
yield line | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can actually drop this workaround since issues was fixed in docker-py 1.10 docker/docker-py#1059 (comment)
b473628
to
08444e4
Compare
There's an intention to merge shub and shub-image, but before it we should improve shub-image a bit to make the merge simpler and cleaner, this PR does the following things:
ruamel
dependency withPyYAML
docker-py
to extrastest.py
with pytest to get rid of mocking__builtins__
).Please, review.