Skip to content

Releases: fullstorydev/grpcurl

v1.3.0

24 May 14:38
7e40455
Compare
Choose a tag to compare

Changes

Command-line tool

  • If the server sends back an error that includes error details (in the form of optional google.protobuf.Any messages), grpcurl previously did not display them, only showing the code and message. Now the details will be included, formatted in either JSON or the protobuf text format, depending on the -format flag (which defaults to JSON). If grpcurl cannot decode the message because the embedded message type is not known, it will format it as JSON with a special "@value" property that shows the encoded bytes.
  • If the user specified -proto and -import-path flags, to load the RPC schema from proto sources, the tool would get confused and likely produce errors if any absolute paths were provided. Now the loading of proto sources works much more like protoc, regarding how file names are resolved based on import paths and relative vs. absolute paths.

Go package "github.com/fullstorydev/grpcurl"

  • The grpcurl.DescriptorSourceFromProtoFiles method would get confused and typically return confusing errors if given absolute paths for the proto file names to parse. This now uses protoparse.ResolveFilenames (from the https://github.com/jhump/protoreflect repo) so that resolving the given paths to files on the file system behaves more like protoc.
  • A new exported method, grpcurl.PrintStatus has been aded that prints the results of an RPC to a given io.Writer. The content written includes a human-readable description of the RPC error code, the error message, and any detail messages (if present).
  • Two new exported methods have been aded for creating jsonpb.AnyResolver implementations that are backed by a grpcurl.DescriptorSource:
    • grpcurl.AnyResolverFromDescriptorSource: uses the given grpcurl.DescriptorSource to resolve message names in Any messages.
    • grpcurl. AnyResolverFromDescriptorSourceWithFallback : the same as the above method except that if the message cannot be resolved via the grpcurl.DescriptorSource, the returned message will be a special message that will format to JSON similarly to a normal google.protobuf.Any message but with a special "@value" attribute that contains the embedded, encoded message bytes.

v1.2.1

07 Mar 18:39
0fcd325
Compare
Choose a tag to compare

Changes

Command-line tool

This release fixes a few issues related to JSON handling when processing user-provided request data and when printing server response data:

  • If a request message included a field of type google.protobuf.Value or google.protobuf.ListValue and the data that grpcurl wanted to send was a "null" value or "[]" empty list (respectively), grpcurl would raise an error, being unable to unmarshal the request data correctly.
  • If a response message included a oneof field that was set to its zero/default value, it would not be shown in the response output from grpcurl unless the -emit-defaults flag were used.
  • If a response message included a oneof field and the -emit-defaults flag were used, all fields of the oneof would be shown, with the unset fields indicating a zero/default value.

v1.2.0

07 Mar 18:17
4c9c82c
Compare
Choose a tag to compare

NOTE: Prefer v1.2.1 over this release. This one was the result of pushing the v1.2.0 tag prematurely.

Changes

Command-line tool

  • Adds -max-msg-sz flag, to set the maximum size of a response message that grpcurl will accept. This was previously hard-coded to 4mb, so now grpcurl can be used with larger messages.

Go package "github.com/fullstorydev/grpcurl"

  • If the grpcurl.BlockingDial function was used to create a long-lived connection, the resulting *grpc.ClientConn would become unusable if the dial context was cancelled (or expired) AND the underlying socket was disconnected and needed to reconnect (such as if the server were restarted). This is now fixed.

v1.1.0

18 Dec 19:06
0f9e76c
Compare
Choose a tag to compare

Changes

Command-line tool

  • Adds -version flag, to print the current version of grpcurl.
  • Adds -format flag which supports using protobuf text format instead of JSON as input and output data format.
  • The describe verb will print elements as proto source instead of JSON representations of descriptor protos. This greatly aids readability of the output.

Go package "github.com/fullstorydev/grpcurl"

  • Deprecates InvokeRpc and RequestMessageSupplier. Instead, use InvokeRPC and RequestSupplier.
  • Adds GetAllFiles function, for trying to load all known file descriptors for a descriptor source.
  • GetDescriptorText now uses protobuf syntax instead of JSON. So a message descriptor will look like the message definition in proto source instead of a JSON representation of the descriptor proto.
  • Go 1.8 and below are no longer supported.

v1.0.0

15 Sep 00:22
d4d048f
Compare
Choose a tag to compare

Initial release using semver versioning scheme, including support for Go modules.