Repository navigation
Conversation
|
Have no idea why it fails on windows, will take a look. |
|
Kind of sad about this. It means unit tests won't use the correct dependencies when run with |
|
Some way a symlink can solve this? (Probably not) |
|
Should we revert until after the release? |
|
@cpuguy83 what so special about release? I think revert would be kinda hard now :/ |
|
Could we split out our libraries into a libdocker repo? (Seems painful...) On 4 Nov 2016 10:08 p.m., "Aaron Lehmann" [email protected] wrote:
|
|
I think that way in this PR is simplest. It's also used by etcd. Code completion is fixable too. |
|
|
Okay, I don't know what's with windows :/ ping @jhowardmsft |
|
Windows CI hard codes the GOPATH. I'd need to update it. What's the priority on this PR? Working through a bunch of stuff for 1.13.... (Currently path would be set $drive:$base\src\github.com\docker\docker\vendor;$drive$base). What would the new path be? (CL too large to show in github :( ) |
|
@jhowardmsft it should be just |
|
$drive$base is already in the gopath..... So there must be somewhere else needed in the path. Is there no src\github.com\docker\docker\vendor directory any more? |
|
@jhowardmsft It is there, but it shouldn't be in GOPATH. I dunno, but somehow windows CI has |
|
I'm confused. Ignore the \go\src\vendor thing - I can probably explain that, but it's not the cause of the problem. Just another place it can't find the dependencies. Surely drive:\base\src\github.com\docker\docker\vendor should be in the GOPATH? Otherwise how is it going to pick up the vendored dependencies? IOW my question is where does this PR move this to? |
|
@jhowardmsft it moves it to |
|
Uh? Is there some documentation on that ('vendored dependencies should be picked by go tool automatically')? AFAIK, it searches the GOPATH for dependencies, and there's no hard-coded opt-in of cmd\vendor to my knowledge. Obviously it's not being picked up. It sounds like the GOPATH does need to be set but to include drive:\base\src\github.com\docker\docker\cmd\vendor. |
|
Any package being built will look for a EDIT: more info https://golang.org/cmd/go/#hdr-Vendor_Directories |
|
That doc doesn't really help at all. I know there's nothing special about a root |
|
No. GOPATH does not need to be aware of vendor directories ever; that's the whole point that @LK4D4 is trying to communicate - the Go toolchain is responsible for discovering |
|
Then it appears if that were the case that the go toolchain isn't doing that for some reason on Windows. If your statement above were correct, I would not have to explicitly have set GOPATH to include the |
|
@jhowardmsft even if you'd set it wouldn't work because there is no |
|
Yes, understood. However, this go tool capability just doesn't seem to work on Windows. And compare to master: |
|
What happens on master when you don't include the vendor directory in GOPATH? Also, what does |
|
@tamird looks like symlinks just doesn't work for windows, that's why. |
|
@tamird Just to clarify - was chatting to @LK4D4 offline. Symlinks which are in a github repo which is cloned on a Windows machine don't work. Not all symlinks. Symlinks in a repo will appear as a file of the right name, the contents of which will be the target of the symlink. But it is still a file, not a symlink. We crossed this bridge some 18+ months ago when the hack/ directory was symlinked to something else in the main docker repo which meant it wasn't usable. The solution was to remove symlinks entirely from the repo contents as stored on github. |
|
@tamird not all consumers are broken. Only those who doesn't remove nested vendor directories. |
|
What is the breakage on windows? Why does it work when vendor repo is at the top level? Where are the symlinks? |
|
@tamird When vendor at the top level, we don't need any symlinks because everything uses that vendor directory(build, unit-tests, integration-cli). When it's in |
|
I'm confused, why do you need that symlink? |
|
@tamird Yeah, it was surprising to me as well. So, cmd has binaries; binaries use some libraries from |
|
I'm still not really a fan of this PR. If you're using We shouldn't be creating a strange directory structure for our integration tests to facilitate dependencies. |
|
That makes no sense. We're not relying on your vendor directory - we are On Tue, Nov 15, 2016 at 4:18 PM, Daniel Nephin [email protected]
|
|
That's strange. How does it break? I guess that's why |
|
My thanks to the peanut gallery, but perhaps it would be prudent of you to read the issue before commenting and suggesting nonsense solutions. |
|
This PR? I've read through it and I don't see anything about the original issue (maybe I missed it?). All the discussion seems to be about windows not working with symlinks. Is there a related issue that isn't linked? Your hostility isn't necessary. |
|
On Tue, Nov 15, 2016 at 5:04 PM, Daniel Nephin [email protected]
|
|
It seems like if |
|
@jhowardmsft If there will be more unhappy people, than happy we can abandon PR. |
|
I'll just mention once more than forcing all consumers of the client package to use a vendor-flattening tool is a not-nice thing, and pretty much unprecedented. EDIT: therefore, I would like to see this merged. |
|
Hum this will break the simple |
|
Looks like this passed CI, but has merge conflicts now. Any updates here? |
|
@tamird I'm rebasing every day, but now every day there is changes in vendor. I definitely saw it green. |
|
Another merge conflict. |
We need this because vendor directory under docker/docker breaks people who use our libraries. This sadly does not run unit tests for cmd/docker and cmd/dockerd, I think we can fix that later. Also this moves integration-cli under cmd dir, because it needs vendored stuff as well. Signed-off-by: Alexander Morozov <[email protected]>
|
Sigh, more merge conflicts. Is it possible for someone to shepherd this? |
|
@tamird - Just to be clear, there isn't yet consensus from the maintainers that this is something we all agree should be implemented yet. There are concerns, including from myself, and this is still in design review, not code review. With the thanksgiving break and many people not working this week, I don't think it's realistic to ask @LK4D4 to keep rebasing until a discussion is had with more of the maintainers. |
|
@LK4D4 So we cannot merge this unfortunately, and this is more of a Go issue. As a stopgap solution, let's go back to GOPATH dancing, and have your |
|
@tiborvass you should close it then :) |
|
@LK4D4 alright sorry :( Hopefully we'll find a solution as part of the ongoing works in the Go world. |
- What I did
Moved vendor directory under cmd/ directory to avoid problems for users who uses libraries from docker repo.
We need this because vendor directory under docker/docker breaks people
who use our libraries.
This sadly does not run unit tests for cmd/docker and cmd/dockerd, I
think we can fix that later.
Also, this moves integration-cli under cmd dir, because it needs vendored
stuff as well.
- How I did it
Modified
hack/vendor.shto put vendor dir undercmd/directory and used some bash code.- How to verify it
make test- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)

ping @vdemeester WDYT