Skip to content

Conversation

@euanh
Copy link
Contributor

@euanh euanh commented Jul 25, 2018

Gogoprotobuf has changed upstream and now generates different output. Check out a specific commit to avoid this.

We may be able to do something like this with go get in 1.11 with 'module aware mode':

go get github.com/gogo/protobuf/protoc-gen-gogo@v1.0.0

This avoids build failures when gogoprotobuf is changed upstream.

Signed-off-by: Euan Harris <euan.harris@docker.com>
@euanh
Copy link
Contributor Author

euanh commented Jul 25, 2018

It looks like they have just made a release, so we should consider jumping to v1.1.1 and regenerating in another pull request.

Unfortunately this will be more work than just bumping the tag, as we get build failures with the newest version:

🐳 build-local
go build -tags experimental -o "bin/dnet" ./cmd/dnet
# github.com/docker/libnetwork/networkdb
networkdb/networkdb.pb.go:214:35: undefined: proto.InternalMessageInfo
networkdb/networkdb.pb.go:274:31: undefined: proto.InternalMessageInfo
networkdb/networkdb.pb.go:336:34: undefined: proto.InternalMessageInfo
networkdb/networkdb.pb.go:405:34: undefined: proto.InternalMessageInfo
networkdb/networkdb.pb.go:470:37: undefined: proto.InternalMessageInfo
networkdb/networkdb.pb.go:538:32: undefined: proto.InternalMessageInfo
networkdb/networkdb.pb.go:638:37: undefined: proto.InternalMessageInfo
networkdb/networkdb.pb.go:707:37: undefined: proto.InternalMessageInfo
networkdb/networkdb.pb.go:755:51: undefined: proto.InternalMessageInfo
# github.com/docker/libnetwork/drivers/overlay
drivers/overlay/overlay.pb.go:75:32: undefined: proto.InternalMessageInfo
Makefile:46: recipe for target 'build-local' failed

@euanh
Copy link
Contributor Author

euanh commented Jul 25, 2018

@selansen, @fcrisciani

@fcrisciani
Copy link

o fix the undefined message you have to bump the version of protobuf in the vendor from 1.0.0 to 1.1.1

-github.com/gogo/protobuf v1.0.0
+github.com/gogo/protobuf v1.1.1

The next problem looks like that the structure PortConfig is not anymore a valid key for a map:

./service_linux.go:260:25: invalid map key type PortConfig

@euanh
Copy link
Contributor Author

euanh commented Jul 26, 2018

@fcrisciani Yes, I don't want to get up to the latest version in this PR - this is just to pin the version of the tools we use so that @selansen can get #2241 to build. Without this change, any PR to master will now fail in the make check target even if it doesn't change any .proto files.

Copy link

@fcrisciani fcrisciani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fcrisciani fcrisciani merged commit 9ffeaf7 into moby:master Jul 26, 2018
@euanh euanh deleted the pin-gogoprotobuf branch July 27, 2018 09:30
sir-xw pushed a commit to openkylin/docker.io that referenced this pull request Apr 22, 2025
This results in a XXX_unrecognized of type []byte to be created in the struct.
As a side effect the struct can't be used as a map key anymore, resulting in
a libnetwork build failure.
 Fix this by setting goproto_unrecognized_all=false which suppresses this field.

 Upstream doesn't have the problem because they have pinned an older version
 of gogo/protobuf: moby/libnetwork#2242
Author: Felix Geyer <fgeyer@debian.org>


Gbp-Pq: Name libnetwork_proto_no_unrecognized_all.patch
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