test: assert list_services response uses proper protobuf structs#78
Merged
mjheilmann merged 4 commits intoelixir-grpc:mainfrom Apr 13, 2026
Conversation
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
e7b767f to
76d9059
Compare
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Contributor
Author
|
@mjheilmann just adding a test to add a bit of more guardrails |
mjheilmann
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
%{service: [...]}instead of%Grpc.Reflection.V1.ListServiceResponse{service: [...]}fromreflect/2triggers deprecation warnings today and will raise in a future version. The implementation was corrected in bump protobuf, and partition process.ex to fix warnings #76, but no tests guarded the contract.list_servicesused%{service: service_list}(plain map pattern) andMap.get(&1, :name), both of which match structs and plain maps equally — so they could not detect a regression back to plain maps even though the roundtrip encode/decode masks the problem anyway.GrpcReflection.Server.V1.reflect/2that bypasses the gRPC roundtrip and asserts%Grpc.Reflection.V1.ListServiceResponse{}and%Grpc.Reflection.V1.ServiceResponse{}struct types explicitly.Map.get/2.