Skip to content
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

Chunks #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Chunks #2

wants to merge 3 commits into from

Conversation

tofay
Copy link
Collaborator

@tofay tofay commented Dec 2, 2020

What did you implement:

Add function for doing a stream POST and converting the HTTP chunks to JSON values.

HTTP chunks can contain one or more JSON values. This is currently handled in Image::build but not Image::pull.
When running with WSL2 and Docker Desktop, shiplift errors when pulling an image that already exists because Docker returns two JSON values in a single chunk.

How did you verify your change:

Ran the imagepull example with the same argument twice in succession.

What (if anything) would need to be called out in the CHANGELOG for the next release:

Nothing

tofay added 2 commits December 2, 2020 08:35
use when pulling docker images, to fix bug where
shiplift would error if multiple JSON values were
returned in a single HTTP chunk
Copy link

@bossmc bossmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, couple of commenting comments inline.

src/lib.rs Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants