Skip to content

Netty implementation of DockerCmdExecFactory#397

Merged
marcuslinke merged 14 commits intomasterfrom
netty
Dec 14, 2015
Merged

Netty implementation of DockerCmdExecFactory#397
marcuslinke merged 14 commits intomasterfrom
netty

Conversation

@marcuslinke
Copy link
Copy Markdown
Contributor

This contains an additional (experimental) implementation of DockerCmdExecFactory. It supports http connection hijacking that is needed for passing STDIN to the container which is a long awaited feature (#253).

Currently there are three missing features compared to the current Apache HttpClient based impl:

  • Connection pooling
  • Automatic http(s) redirection
  • Http(s) proxy support

Any feedback is really appreciated!

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.

remove this header?

@KostyaSha
Copy link
Copy Markdown
Member

Resorted imports 😱 After this PR i will try reflect in http://checkstyle.sourceforge.net/config_imports.html#ImportOrder

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.

why betas?

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.

Latest netty stable release 4.0.33.FINAL is missing some features that are needed here. It might be possible to backport it from 4.1.0.Beta7 but as it is an experimental implementation of DockerCmdExecFactory I think its OK for now.

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.

ok

@KostyaSha
Copy link
Copy Markdown
Member

Oh, crazy PR :)
Am i right understand that you duplicated all commands for netty?

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.

reformat styling? case intend.

@KostyaSha
Copy link
Copy Markdown
Member

Too big for understanding, i propose merge it and test from master. I can try to use new implementation in my reference jenkins plugin.

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.

unused?

@marcuslinke
Copy link
Copy Markdown
Contributor Author

@KostyaSha This PR duplicates mostly the Exec parts for the commands only. It doesn't touch any public API, so library users could simply switch to the new netty based DockerCmdExecFactoryImpl by plugging it into the DockerClient and everything should work as before plus it is possible now attach to a running container and pass STDIN to it.

Internally I tried to imitate the JAX-RS API for two reasons:

  • easier migration from JAX-RS based *Exec classes to netty while coexistence of both implementations
  • easier implementation of new commands by people not familar with netty but JAX-RS after switching to netty completely

@KostyaSha
Copy link
Copy Markdown
Member

I asked from support perspective :) Feel free to merge as soon as you think that it's enough.

@marcuslinke
Copy link
Copy Markdown
Contributor Author

I'm not sure if I should merge as some important features are still missing. See initial comment please. WDYT?

@KostyaSha
Copy link
Copy Markdown
Member

If missing features not breaking existed connection factory, then merge of course.

@KostyaSha
Copy link
Copy Markdown
Member

Either i will be unable rework tests/poms.
What probably really need to be checked it's dependencies (hope they are not conflicting).

@KostyaSha
Copy link
Copy Markdown
Member

Also please put @Beta annotation on all classes that are not your final implementation.

marcuslinke added a commit that referenced this pull request Dec 14, 2015
Netty implementation of DockerCmdExecFactory
@marcuslinke marcuslinke merged commit 9f77972 into master Dec 14, 2015
@marcuslinke marcuslinke deleted the netty branch January 12, 2016 22:18
@zhaopengme zhaopengme mentioned this pull request Jan 18, 2016
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