fullstorydev / grpcurl

Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers
MIT License
10.36k stars 497 forks source link

Use `grpc.reflection.v1.ServerReflection` #407

Closed sigv closed 10 months ago

sigv commented 10 months ago

The proper v1 gRPC reflection has been around for a bit. The "client auto" mechanism still supports falling back to v1alpha. Not many support the v1, but we should default to it when possible.

ghost commented 10 months ago
👇 Click on the image for a new way to code review #### [![Review these changes using an interactive CodeSee Map](https://s3.us-east-2.amazonaws.com/maps.codesee.io/images/github/fullstorydev/grpcurl/407/da9b979f/918921431d49aca5a5e5047da95b22cf04367200.svg)](https://app.codesee.io/r/reviews?pr=407&src=https%3A%2F%2Fgithub.com%2Ffullstorydev%2Fgrpcurl) #### Legend CodeSee Map legend
sigv commented 10 months ago

Just to make sure it's clear: How it works in practice is, it tries the v1 endpoint, which is newer. If v1 fails, then it tries v1alpha essentially resulting in already existing behavior/backwards compatibility.

jhump commented 10 months ago

👍

This was something I added to grpcreflect a while ago (nearly a year ago), after seeing that the v1 version of the proto had been around quite a while and that Connect was already using it.

Sadly, at that time, none of the official implementations actually provided v1, only v1alpha (so I filed an issue). It was finally implemented in the grpc-go module recently (your welcome 🤣).

dragonsinth commented 10 months ago

LOL, you go @jhump !