Allow gRPC clients to silently ignore unknown fields during serialization

The k6’s GRPC client currently does not support using discardUnknownFields param in the GRPC client which limits the user to intentionally ignore unknown fields during the protobuf serialization process.

There are use-cases where it’d enable working with JSON request data that contains fields not present in the proto definition, such as extension fields or newer schema additions.

I’ve raised an MR to add that param: feat(grpc): add discardUnknownFields param to invoke and stream by kumar1202 · Pull Request #5742 · grafana/k6 · GitHub

Please let me know if this makes sense. Thanks!

Thank you for opening the PR @kumarabhijeet1202. My collegues will review it when they have time. We just released a k6 version and getting ready for v2, which might mean it takes longer than usual.