Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix for #670#680

Merged
KostyaSha merged 1 commit into
docker-java:masterdocker-java/docker-java:masterfrom
tejksat:fixLoadImageFromTarFailstejksat/docker-java:fixLoadImageFromTarFailsCopy head branch name to clipboard
Aug 28, 2016
Merged

Fix for #670#680
KostyaSha merged 1 commit into
docker-java:masterdocker-java/docker-java:masterfrom
tejksat:fixLoadImageFromTarFailstejksat/docker-java:fixLoadImageFromTarFailsCopy head branch name to clipboard

Conversation

@tejksat

@tejksat tejksat commented Aug 25, 2016

Copy link
Copy Markdown
Contributor

JSON decoding disabled when response body is not expected to be parsed as a JSON.


This change is Reviewable

@tejksat

tejksat commented Aug 25, 2016

Copy link
Copy Markdown
Contributor Author

It could be fixed with this check or it could be a new post() method of InvocationBuilder, f.e. without TypeReference parameter.

channel.pipeline().addLast(new JsonObjectDecoder());
channel.pipeline().addLast(jsonResponseHandler);

if (!Void.class.equals(typeReference.getType())) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe instanceof check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would rather refractor and extract a specific method without JSON mapping. I'll do it in the nearest days.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So merge it or better wait?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@KostyaSha done! Pls check.

@KostyaSha

Copy link
Copy Markdown
Member

hello world still fails on first run :E but seems loadimage test fixed.
LGTM

@tejksat tejksat force-pushed the fixLoadImageFromTarFails branch from 3b154a9 to 548b247 Compare August 27, 2016 21:25
JSON decoding disabled on /images/load command execution.
@tejksat tejksat force-pushed the fixLoadImageFromTarFails branch from 548b247 to cc8dbea Compare August 27, 2016 22:40
@KostyaSha

KostyaSha commented Aug 28, 2016

Copy link
Copy Markdown
Member

@tejksat mmm... maybe it could be combined with #664 ?
The problem is that for some arguments loadImage may return json and for some plain text.
Now we have only:

 public class LoadImageCmdExec extends AbstrSyncDockerCmdExec<LoadImageCmd, Void> implements
         LoadImageCmd.Exec {

But i tried to make #664 with JsonParsed content and broke current quiet call.

So probably we can offer 2 different callbacks for end-users so they can choose them self what to use for what mix of arguments?

@KostyaSha

Copy link
Copy Markdown
Member

Merging this as it fixes test for 1.12 engine

@KostyaSha KostyaSha added this to the 3.0.6 milestone Aug 28, 2016
@KostyaSha KostyaSha merged commit c8ab23f into docker-java:master Aug 28, 2016
@tejksat tejksat deleted the fixLoadImageFromTarFails branch September 12, 2016 13:12
panuse pushed a commit to TuKangTech/docker-java that referenced this pull request Aug 20, 2017
JSON decoding disabled on /images/load command execution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.