From: Arnaud Rebillout Date: Tue, 22 Jan 2019 05:22:52 +0000 (+0700) Subject: Build against google-grpc 1.11, where md.Get() does not exist. X-Git-Tag: archive/raspbian/18.09.9+dfsg1-5+rpi1~1^2~22 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=520f85df1b526baeb3bbb037c1ce00db5d2deaeb;p=docker.io.git Build against google-grpc 1.11, where md.Get() does not exist. This patch is based on the commit that introduced md.Get() in google-grpc: . Please drop this patch as soon as we build docker against google-grpc >= 1.12. Origin: vendor, Debian Forwarded: not-needed, Debian-specific Signed-off-by: Arnaud Rebillout Gbp-Pq: Name buildkit-build-against-google-grpc-1.11.patch --- diff --git a/cli/vendor/github.com/moby/buildkit/client/buildid/metadata.go b/cli/vendor/github.com/moby/buildkit/client/buildid/metadata.go index bb169b8f..c0df9891 100644 --- a/cli/vendor/github.com/moby/buildkit/client/buildid/metadata.go +++ b/cli/vendor/github.com/moby/buildkit/client/buildid/metadata.go @@ -2,6 +2,7 @@ package buildid import ( "context" + "strings" "google.golang.org/grpc/metadata" ) @@ -21,7 +22,8 @@ func FromIncomingContext(ctx context.Context) string { return "" } - if ids := md.Get(metadataKey); len(ids) == 1 { + k := strings.ToLower(metadataKey) + if ids := md[k]; len(ids) == 1 { return ids[0] } diff --git a/engine/vendor/github.com/moby/buildkit/client/buildid/metadata.go b/engine/vendor/github.com/moby/buildkit/client/buildid/metadata.go index bb169b8f..c0df9891 100644 --- a/engine/vendor/github.com/moby/buildkit/client/buildid/metadata.go +++ b/engine/vendor/github.com/moby/buildkit/client/buildid/metadata.go @@ -2,6 +2,7 @@ package buildid import ( "context" + "strings" "google.golang.org/grpc/metadata" ) @@ -21,7 +22,8 @@ func FromIncomingContext(ctx context.Context) string { return "" } - if ids := md.Get(metadataKey); len(ids) == 1 { + k := strings.ToLower(metadataKey) + if ids := md[k]; len(ids) == 1 { return ids[0] }