-
Notifications
You must be signed in to change notification settings - Fork 105
Fix problems introduced by #58 #61
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
Conversation
I put I replaced |
Is there an ETA on this fix? |
Ping @thaJeztah |
up! |
Sorry, but this PR wont compile: |
up! |
@PaulSD what @thomasmodeneis says is valid. Can you plz remove that not used import so we can get this one merged? |
@thaJeztah @AkihiroSuda can we get this one merged with #62 ? |
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.
please sign the commit with git commit -s
and fix the compilation failure reported above
#62 seems to lack the DCO as well |
One moment, working on it... |
Should be good now. Anything else I missed? |
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.
thanks
work fine |
Any ETA on merging this PR? |
ping @thaJeztah |
* Add missing import of "context" (Fixes docker#60) * Drop configuration of the http.Transport.DialContext based on proxy settings (This was originally needed for SOCKS support, but has not been required since https://go-review.googlesource.com/c/go/+/35488/ in Go 1.9, and is no longer supported as of https://go-review.googlesource.com/c/go/+/41031/ in Go 1.11) Signed-off-by: Paul Donohue <[email protected]>
@olljanat Fixed, thanks! |
What is currently preventing this from being merged? |
merging. I assume single LGTM is enough in this case |
argh, sorry; yes, SGTM |
if err != nil { | ||
return err | ||
} | ||
tr.DialContext = dialer.DialContext |
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.
This seems to have caused a problem for me because now the unix transport is used when I have specified an HTTP endpoint.
The dial context is used and for an http endpoint it tries to connect to a unix socket instead of a tcp socket.
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'm not following you ...
The code you highlighted here was only used to configure the proxy on Go <1.9, and was removed because it is redundant and no longer necessary in Go >=1.9.
Removal of this code should not impact transport selection. Transport selection occurs a few lines earlier, and was not modified by this change: https://github.com/docker/go-connections/blob/master/sockets/sockets.go#L17
Maybe you have a proxy configured using a UNIX socket?
Since docker#61, there's no more DialContext defined in the default switch case of ConfigureTransport. As a consequence, if ConfigureTransport was already called with a npipe or unix proto (ie. Docker client does that to initialize its HTTP client with the default DOCKER_HOST), the DialContext function defined by these protocols will be used. As the DialContext functions defined by unix and npipe protos totally ignore DialContext's 2nd and 3rd argument (ie. network and addr) and instead use the equivalent arguments passed to configureUnixTransport and configureNpipeTransport when they were called, this results in ConfigureTransport being totally ineffective. In addition, DisableCompression is also reset to false. Signed-off-by: Albin Kerouanton <[email protected]>
Since docker#61, there's no more DialContext defined in the default switch case of ConfigureTransport. As a consequence, if ConfigureTransport was already called with a npipe or unix proto (ie. Docker client does that to initialize its HTTP client with the default DOCKER_HOST), the DialContext function defined by these protocols will be used. As the DialContext functions defined by unix and npipe protos totally ignore DialContext's 2nd and 3rd argument (ie. network and addr) and instead use the equivalent arguments passed to configureUnixTransport and configureNpipeTransport when they were called, this results in ConfigureTransport being totally ineffective. In addition, DisableCompression is also reset to false. Signed-off-by: Albin Kerouanton <[email protected]>
Since docker#61, there's no more DialContext defined in the default switch case of ConfigureTransport. As a consequence, if ConfigureTransport was already called with a npipe or unix proto (ie. Docker client does that to initialize its HTTP client with the default DOCKER_HOST), the DialContext function defined by these protocols will be used. As the DialContext functions defined by unix and npipe protos totally ignore DialContext's 2nd and 3rd argument (ie. network and addr) and instead use the equivalent arguments passed to configureUnixTransport and configureNpipeTransport when they were called, this results in ConfigureTransport being totally ineffective. In addition, DisableCompression is also reset to false. Signed-off-by: Albin Kerouanton <[email protected]>
Since docker#61, there's no more DialContext defined in the default switch case of ConfigureTransport. As a consequence, if ConfigureTransport was already called with a npipe or unix proto (ie. Docker client does that to initialize its HTTP client with the default DOCKER_HOST), the DialContext function defined by these protocols will be used. As the DialContext functions defined by unix and npipe protos totally ignore DialContext's 2nd and 3rd argument (ie. network and addr) and instead use the equivalent arguments passed to configureUnixTransport and configureNpipeTransport when they were called, this results in ConfigureTransport being totally ineffective. Signed-off-by: Albin Kerouanton <[email protected]>
So apparently I missed an import line in #58 (See #60 🤦♂️). I've also since discovered problems with current versions of Go, which dropped support for golang.org/x/net/proxy. This PR fixes both of those issues.