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

Implement "decode" parameter in pull() #484

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

D3vil0p3r
Copy link
Contributor

@D3vil0p3r D3vil0p3r commented Dec 19, 2024

Implement decode (bool) parameter in pull(). Decode the JSON data from the server into dicts. Only applies with stream=True.

If decode is not implemented, the output will be something like:

b'{"stream":"Trying to pull docker.io/ohmyzsh/zsh:latest...\\n"}
...

By implementing decode the pull output will be:

{'stream': 'Trying to pull docker.io/ohmyzsh/zsh:latest...\n'}

It partial covers #456

@rhatdan
Copy link
Member

rhatdan commented Dec 19, 2024

@jwhonce PTAL

@D3vil0p3r
Copy link
Contributor Author

D3vil0p3r commented Jan 7, 2025

I also integrated a test. It can be run on integration directory by executing:

pytest test_images.py::ImagesIntegrationTest::test_pull_stream_decode

@jwhonce sorry for the ping, could you please review also this PR?

Thanks

@rhatdan
Copy link
Member

rhatdan commented Jan 8, 2025

@D3vil0p3r Could you squash your commits.

@rhatdan
Copy link
Member

rhatdan commented Jan 8, 2025

/approve
LGTM
@jwhonce @umohnani8 PTAL

Copy link
Contributor

openshift-ci bot commented Jan 8, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: D3vil0p3r, rhatdan
Once this PR has been reviewed and has the lgtm label, please assign vrothberg for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Implement `decode (bool)` parameter in `pull()`. Decode the JSON data from the server into dicts. Only applies with `stream=True`.

Signed-off-by: Antonio <vozaanthony@gmail.com>
@D3vil0p3r
Copy link
Contributor Author

@D3vil0p3r Could you squash your commits.

Thank you very much. Commit squashed.

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