Skip to content

Metadata context changes are not backwards compatible/break existing code #1219

Closed
@bufdev

Description

@bufdev

Note the example here is not just propagating contexts in memory, this is a full client/server interaction that should be serialized and work properly, ie this is not a dup of #1178. This should get into transport/http2_client.go and transport/http2_server.go, and work properly per the implementation in those files, we are not doing something like FromContext(NewContext(ctx, md)).

I understand that the API was written so that existing users of NewContext and FromContext would not be affected, but items are explicitly not being propagated now. See comment below to reproduce.

I think this is a pretty serious bug. We're not doing anything THAT fancy with grpc-go, we effectively bring up a vanilla grpc.Server and install handlers on it, and then use grpc.Invoke with vanilla grpc.ClientConns. I don't think the implementation is working as intended - maybe I'm doing something wrong, but we are doing these calls across the wire and updating makes this break, I wanted to make sure everyone is alerted ASAP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: API ChangeBreaking API changes (experimental APIs only!)Type: FeatureNew features or improvements in behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions