-
Notifications
You must be signed in to change notification settings - Fork 563
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
Add support for Windows named pipes #579
Conversation
@samuelkarp thanks for you awesome work :-D I'll try to get a Windows CI to make sure we run the tests. Do you know if we can run integration tests on AppVeyor (i.e. have a Docker daemon running in the box)? Cheers! |
@fsouza I missed the Looking at |
@samuelkarp hm, I'm not entirely sure. Ideally it would test that it can communicate with named pipes, so we would need a whole new integration test. Here's what I'm going to do: I'll setup the appveyor to run |
@fsouza That sounds like a good plan. Testing whether it can communicate over named pipes should be easy (the other tests already do that and we can either pass the named pipe location to I can't promise that I'll have time to get the integration test done, but I'll see if I can get something quickly today. |
yay! thanks for doing this @samuelkarp. very helpful 👍 @fsouza "Do you know if we can run integration tests on AppVeyor" => we're currently using docker-machine for CI on windows, but we'll definitely be investigating getting Docker for Windows up and running on AppVeyor. |
"net/http/httptest" | ||
"sync" | ||
|
||
winio "github.com/Microsoft/go-winio" |
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.
does the package need the name declaration? client_windows.go
doesn't have it
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.
No, not necessary. I think goimports
did it for me here and I must have manually written the import in the other file.
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.
Nice catch @zramsay, thanks!
@samuelkarp can you remove the aliasing from this line and make this just "github.com/Microsoft/go-winio".
@samuelkarp changes look mostly good to me. Sorry for the long delay in getting back to you. I have appveyor setup in a branch with this PR merged, the test suite passes, but the race detector detected some data races: https://ci.appveyor.com/project/fsouza/go-dockerclient/build/6. Can you take a look? It looks like calling close concurrently to any write/read is not safe :-( You can copy the appveyor.yml file to your branch to have app veyor running your changes in the PR. |
82574b1
to
120845c
Compare
@fsouza Thank you for taking a look! I've addressed the aliasing comment and opened microsoft/go-winio#31 for the race condition in the go-winio library. |
(I've also rebased on top of the current tip of |
@samuelkarp awesome, thanks! I'll just wait for travis and merge this. Before pushing to master, I'll disable Thank you very much for working on that! |
Fixes #531
This series of commits adds support for communicating with Docker over a Windows named pipe.
There are a few things to note:
container_unix_test.go
to Windows; I started running into some issues withAccept()
on anet.Listener
for a named pipe and haven't spent time troubleshooting it yet. If this is a blocker to accepting the pull request I can spend more time here.All the commits here are contributed under the terms of the BSD 2-clause license.
Let me know if you need anything else!