grpc: Fix usage of Any types after refactor on protobuf loading #5089
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
After #5017 turned out that k6 does not propagate the types it loads when making gRPC calls. This means that in many of the cases the globalTypes will be used, which will lead to errors.
This likely is not just around
Anybut is how it was reported.This PR goes and propagates the types in each place where they will be marshaled/unmarshalled.
The added test is not perfect, but does catch the problem without needing #4981 which I would expect would've also caught this. As currently the server will load the prototypes in the global types and k6/net/grpc will load them in their local types. And then they will technically work.
Why?
This likely breaks loading grpc proto types for anything using
Any, but likely more cases.Checklist
make check) and all pass.Checklist: Documentation (only for k6 maintainers and if relevant)
Please do not merge this PR until the following items are filled out.
Related PR(s)/Issue(s)
Fixes #5088