-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 vendoring to containerd master #390
Conversation
This must be removed also https://github.com/docker/containerd/blob/master/Makefile#L37 |
LGTM |
67fb15b
to
2b4b7cf
Compare
Updated to handle Fedora btrfs build issue just solved in containerd/btrfs#1 |
@estesp can you remove the |
@runcom No, |
LGTM |
I must be blind, sorry for the noise.. |
The |
@mlaventure Typically, we can just add something like |
I don't think there's currently a standard for Also, I'd rather take it from the vendoring since we're introducing it, it'll always be there and at the right version |
Speaking of that @mlaventure after fixing that I find an interesting host-specific potential difficulty..my ubuntu 16.04 system has a Edit: for future Ubuntu users interest, this file is provided by the package protobuf-compiler:
|
@crosbymichael @mlaventure please check my work on the protoc updates.. I assume because the imported protos are not exactly matching what someone else used, a file descriptor array was updated, but all actual generated code is the same. |
@estesp Ideally, we want to avoid having the build rely on docker. Lose the garbage system packages (seriously, I don't know what they are thinking when they package these and make them so useless) and just get the package from https://github.com/google/protobuf/releases. The zip looks like this: $ tar tvf protoc-3.1.0-linux-x86_64.zip
drwxrwxrwx 0 0 0 0 Sep 26 17:15 include/
drwxrwxrwx 0 0 0 0 Sep 26 17:15 include/google/
drwxrwxrwx 0 0 0 0 Sep 26 17:15 include/google/protobuf/
-rwxrwxrwx 0 0 0 4545 Sep 26 17:15 include/google/protobuf/timestamp.proto
-rwxrwxrwx 0 0 0 2263 Sep 26 17:15 include/google/protobuf/source_context.proto
-rwxrwxrwx 0 0 0 5236 Sep 26 17:15 include/google/protobuf/any.proto
-rwxrwxrwx 0 0 0 7077 Sep 26 17:15 include/google/protobuf/api.proto
-rwxrwxrwx 0 0 0 33431 Sep 26 17:15 include/google/protobuf/descriptor.proto
-rwxrwxrwx 0 0 0 3781 Sep 26 17:15 include/google/protobuf/struct.proto
-rwxrwxrwx 0 0 0 3745 Sep 26 17:15 include/google/protobuf/wrappers.proto
drwxrwxrwx 0 0 0 0 Sep 26 17:15 include/google/protobuf/compiler/
-rwxrwxrwx 0 0 0 7655 Sep 26 17:15 include/google/protobuf/compiler/plugin.proto
-rwxrwxrwx 0 0 0 2422 Sep 26 17:15 include/google/protobuf/empty.proto
-rwxrwxrwx 0 0 0 4230 Sep 26 17:15 include/google/protobuf/duration.proto
-rwxrwxrwx 0 0 0 7854 Sep 26 17:15 include/google/protobuf/field_mask.proto
-rwxrwxrwx 0 0 0 5788 Sep 26 17:15 include/google/protobuf/type.proto
drwxrwxrwx 0 0 0 0 Sep 26 17:15 bin/
-rwxrwxrwx 0 0 0 4114152 Sep 25 18:23 bin/protoc
-rwxrwxrwx 0 0 0 538 Sep 26 17:15 readme.txt To install, do the following:
You can use the brew package on Mac OS, because they don't exhibit the sloppy packaging of distro upstreams, but the same thing will work without brew if you get the darwin version. |
@@ -2,7 +2,7 @@ syntax = "proto3"; | |||
|
|||
package containerd.v1; | |||
|
|||
import "google/protobuf/empty.proto"; | |||
import "ptypes/empty/empty.proto"; |
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 is not right. You need to use the canonical path or you break everything.
@@ -1,3 +1,3 @@ | |||
package execution | |||
|
|||
//go:generate protoc -I.:../..:../../../../../github.com/gogo/protobuf:/usr/local/include --gogoctrd_out=plugins=grpc,import_path=github.com/docker/containerd/api/execution,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. execution.proto | |||
//go:generate protoc -I.:${PWD}/vendor/github.com/golang/protobuf:${PWD}/vendor/github.com/gogo/protobuf:${PWD}/vendor/github.com/gogo/protobuf/protobuf:/usr/local/include --gogoctrd_out=plugins=grpc,import_path=github.com/docker/containerd/api/execution,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. execution.proto |
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.
Follow my directions on the other issue here and it will work.
Please, I know everyone is excited, but don't mess with the protobufs unless you know what you're doing. You'll probably just make things worse (speaking from experience). |
-LGTM |
c525de3
to
4a63706
Compare
@stevvooe PR is fixed; no more weird changes to protobufs, and developer's will have to install from upstream protobuf release in |
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.
How about mentioning the version of vndr and protoc in some doc?
github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9 | ||
# matttproud/golang_protobuf_extensions; v1.0.0 release | ||
github.com/matttproud/golang_protobuf_extensions v1.0.0 | ||
# go-units from Docker; latest release = 0.3.1 |
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.
nit: I think the notation of "latest" can quickly become outdated. Also, mentioning the version tag in the comment seems too verbose.
So, how about:
# go-units from Docker; latest release at 12/16/2016
I really don't mind burdening the developer here. We just need solid docs for getting protobuf installed. |
@@ -1,3 +1,3 @@ | |||
package execution | |||
|
|||
//go:generate protoc -I.:../..:../../../../../github.com/gogo/protobuf:/usr/local/include --gogoctrd_out=plugins=grpc,import_path=github.com/docker/containerd/api/execution,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. execution.proto | |||
//go:generate protoc -I.:${PWD}/vendor/github.com/gogo/protobuf:/usr/local/include --gogoctrd_out=plugins=grpc,import_path=github.com/docker/containerd/api/execution,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. execution.proto |
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.
So, shell doesn't get evaluated in go:generate
.
This needs to be
-I.:../../vendor:../../vendor/github.com/gogo/protobuf:../../../../../..:/usr/local/include
This creates the following:
- Local path import.
- Vendor path for project.
gogo/protobuf
as a top-level path space (i think this is right).- The current GOPATH as a path space.
/usr/local/include
as a path space.
I know this is weird but it keeps the import paths for the individual protobuf files from becoming non-canonical when used as dependencies.
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.
@stevvooe just FYI, it does appear via the Makefile
or with a bare go generate
on the command line, ${PWD}
is being evaluated in both cases. However, it may not matter that much as there will still be lots of ../
paths even with ${PWD}
available. So I will update with the path set from above and hopefully that will get this PR ready to move forward with.
4a63706
to
10512a6
Compare
@stevvooe updated with the new paths; PTAL |
Created #400 for simple quick-start, including the need to get the protoc release and install it in |
ping @stevvooe ; I know the fixups to the prior review happened late in the year, so just wanting to restart the discussion on this and get it in if we are all good with the updates. |
Yep, lets get vendoring figured out this week |
# logrus, v0.11.0 latest release | ||
github.com/sirupsen/logrus v0.11.0 | ||
# go-btrfs from stevvooe; following master HEAD on 12/16/2016 | ||
github.com/stevvooe/go-btrfs a5487675780517f5c3e7dd697c70157466b8dcae |
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.
Can you update go-btrfs
to the current HEAD
? containerd/btrfs#4 is now used in the tests.
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.
Sure, will update
LGTM after updating go-btrfs. |
Initial vendor list validated with empty $GOPATH and only master checked out; followed by `make` and verified that all binaries build properly. Updates require github.com/LK4D4/vndr tool. Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Use vendored-in protos in the project path rather than expecting developers to have them in a local path on the host. This made a generated change in the FileDescriptor content, but everything else matches and binaries are building properly. Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
10512a6
to
f867156
Compare
Re-pushed with update to latest go-btrfs; also updated |
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.
LGTM
LGTM |
Fixes #381
Initial vendor list validated with empty
$GOPATH
and only master checked out; followed by
make
and verified that all binaries build properly.
Updates require github.com/LK4D4/vndr tool.
Signed-off-by: Phil Estes estesp@linux.vnet.ibm.com