Skip to content
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

metadata.NewOutgoingContext is undefined #364

Closed
aaronjwood opened this issue Apr 18, 2017 · 8 comments
Closed

metadata.NewOutgoingContext is undefined #364

aaronjwood opened this issue Apr 18, 2017 · 8 comments

Comments

@aaronjwood
Copy link

This breaks programs that link against grpc-gateway directly or indirectly (such as etcd-io/etcd#7763)

@tamalsaha
Copy link
Collaborator

tamalsaha commented Apr 18, 2017

@aaronjwood , may be use 1.2.0 of grpc-gateway? The real fix is, you need the next release of grpc go. grpc/grpc-go#1187 :)

@aaronjwood
Copy link
Author

Thanks, we're working on a vendoring strategy so we'll be sure to catch this. Glad to hear it's fixed in the next release.

@tmc
Copy link
Collaborator

tmc commented Apr 18, 2017

@aaronjwood for clarity, grpc-go introduced an api deprecation and we adopted this in 1.2.2 -- use 1.2.0 if you need to use an older version of grpc-go. The answer is likely update your version of grpc-go.

@tmc tmc closed this as completed Apr 18, 2017
@tmc
Copy link
Collaborator

tmc commented Apr 18, 2017

For posterity's sake (and googlebot), this sort of issue would likely render as:

# github.com/your/sweet/project/vendor/github.com/grpc-ecosystem/grpc-gateway/runtime
vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/context.go:97: undefined: metadata.NewOutgoingContext

Somewhat relatedly, these sorts of errors likely mean you need to re-generate your .pb.gw.go files with a newer grpc-gateway:

protos/servicea/rpc.pb.gw.go:614: not enough arguments in call to runtime.AnnotateContext
	have ("golang.org/x/net/context".Context, *http.Request)
	want ("golang.org/x/net/context".Context, *runtime.ServeMux, *http.Request)
protos/servicea/rpc.pb.gw.go:616: not enough arguments in call to runtime.HTTPError
	have ("golang.org/x/net/context".Context, runtime.Marshaler, http.ResponseWriter, *http.Request, error)
	want ("golang.org/x/net/context".Context, *runtime.ServeMux, runtime.Marshaler, http.ResponseWriter, *http.Request, error)

@tmc
Copy link
Collaborator

tmc commented Apr 18, 2017

@aaronjwood perhaps a valuable documentation addition would be a small vendoring guide. Would love to see some shared tips!

@aaronjwood
Copy link
Author

Thanks for the info @tmc! Let me sort out our internal issues at work from this and then I can come back to some sort of vendoring doc :)

@tmc
Copy link
Collaborator

tmc commented Apr 18, 2017

@aaronjwood that'd be awesome!

@tmc
Copy link
Collaborator

tmc commented Apr 18, 2017

I opened #365 to track.

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

No branches or pull requests

3 participants