Skip to content

xds: Failing to pretty-print XdsClusterResource with WrrLocality #11918

Closed
@sergiitk

Description

@sergiitk

What version of gRPC-Java are you using?

master

What did you expect to see?

[xds-client<11>: (trafficdirector.googleapis.com:443)] Received io.grpc.xds.XdsRouteConfigureResource@2853620 response:
{
  "versionInfo": "1740136353437937972",
...
  # regular proto-to-json dump

What did you see instead?

[xds-client<11>: (trafficdirector.googleapis.com:443)] Received io.grpc.xds.XdsClusterResource@3df1ae25 response:
version_info: "1740137068789933426"
resources {
  type_url: "type.googleapis.com/envoy.config.cluster.v3.Cluster"
  value: "\n>cloud-internal-istio:cloud_mp_830293263384_3977456584708448201\020\003\032\n\n\b\032\000\"\002\b\0170\002\"\002\b\036R\"\n \022\006\b\377\377\377\377\a\032\006\b\377\377\377\377\a\"\006\b\377\377\377\377\a*\006\b\377\377\377\377\ar\004\022\002\bd\312\001\231\001\n\226\001\n\032com.google.trafficdirector\022x\n+\n\036backend_service_project_number\022\t\021\000\000\203\270**hB\nI\n\024backend_service_name\0221\032/psm-interop-backend-service-20250221-1118-f2oj1\332\001\r\n\t\t\000\000\000\000\000\000\360?\032\000\342\001]/projects/830293263384/global/backendServices/psm-interop-backend-service-20250221-1118-f2oj1\312\002\223\006\n\220\006\"\215\006\nNBACKEND_SERVICE/830293263384.psm-interop-backend-service-20250221-1118-f2oj1-0\022\272\005\nXtype.googleapis.com/envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality\022\335\004\n\332\004\n\313\001\"\310\001\nNBACKEND_SERVICE/830293263384.psm-interop-backend-service-20250221-1118-f2oj1-1\022v\n+type.googleapis.com/xds.type.v3.TypedStruct\022G\n5type.googleapis.com/test.ThisLoadBalancerDoesNotExist\022\016\n\f\n\003foo\022\005\032\003bar\n\331\001\"\326\001\nNBACKEND_SERVICE/830293263384.psm-interop-backend-service-20250221-1118-f2oj1-2\022\203\001\n+type.googleapis.com/xds.type.v3.TypedStruct\022T\n0type.googleapis.com/test.RpcBehaviorLoadBalancer\022 \n\036\n\vrpcBehavior\022\017\032\rerror-code-15\n\255\001\"\252\001\nNBACKEND_SERVICE/830293263384.psm-interop-backend-service-20250221-1118-f2oj1-3\022X\nVtype.googleapis.com/envoy.extensions.load_balancing_policies.round_robin.v3.RoundRobin\322\002\006*\002\b\0020\002"
}
type_url: "type.googleapis.com/envoy.config.cluster.v3.Cluster"
nonce: "1"
 (failed to pretty-print: com.google.protobuf.InvalidProtocolBufferException: Cannot find type for url: type.googleapis.com/envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality)

Steps to reproduce the bug

Found in this custom_lb test log for the xds client:
https://btx.cloud.google.com/invocations/c0912cc5-ac27-40e6-ae30-f8a91860df80/targets/grpc%2Fjava%2Fmaster%2Fbranch%2Fxds_k8s_lb%2Fcustom_lb_test;config=default/log

I think we just need to add WrrLocality to

TypeRegistry.Builder registry =
TypeRegistry.newBuilder()
.add(Listener.getDescriptor())
.add(HttpConnectionManager.getDescriptor())

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @sergiitk@ejona86

      Issue actions

        xds: Failing to pretty-print XdsClusterResource with WrrLocality · Issue #11918 · grpc/grpc-java