Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Fix proto descriptor extract service #497

Closed

Conversation

pvlugter
Copy link
Member

@pvlugter pvlugter commented Dec 3, 2020

Resolves #496.

If there are multiple entities registered, which have separate file descriptors but share the same package name, then subsequent services can't be found. The extractService method is used to collect the first matching service. Previously it would filter on the package, and then do a findServiceByName, but this will return a Some(null) on an earlier file descriptor if the service is actually in a later file descriptor. Update to only return Some(serviceDescriptor) if found, otherwise None to continue the search. I'm assuming this was the original intention.

Can follow up with a test...

@pvlugter pvlugter requested a review from jroper December 3, 2020 00:52
@jroper
Copy link
Member

jroper commented Dec 3, 2020

I think I fixed this in #465.

@pvlugter
Copy link
Member Author

pvlugter commented Dec 3, 2020

I think I fixed this in #465.

👍 Ah, didn't think of checking that PR. Yes, fixed in the same way with a flatMap (just unnecessary option allocations).

@pvlugter pvlugter closed this Dec 3, 2020
@pvlugter pvlugter deleted the proto-descriptor-package branch December 3, 2020 03:27
@pvlugter
Copy link
Member Author

pvlugter commented Dec 3, 2020

I'm assuming #465 ends up testing this in some way then, if it was uncovered then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure: multiple grpc services in the same package
2 participants