Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotation based mapping between xDS message types and endpoints #9454

Closed
htuch opened this issue Dec 22, 2019 · 0 comments · Fixed by #9566
Closed

Annotation based mapping between xDS message types and endpoints #9454

htuch opened this issue Dec 22, 2019 · 0 comments · Fixed by #9566
Assignees
Labels
api/v3 Major version release @ end of Q3 2019 area/xds enhancement Feature requests. Not bugs or questions.
Milestone

Comments

@htuch
Copy link
Member

htuch commented Dec 22, 2019

Instead of having to hardcode https://github.com/envoyproxy/envoy/blob/master/source/common/config/type_to_endpoint.cc, we should be able to express this relationship via protobuf option annotations, allowing this mapping to be performed programatically.

CC @lizan

@htuch htuch added area/xds enhancement Feature requests. Not bugs or questions. help wanted Needs help! labels Dec 22, 2019
@htuch htuch self-assigned this Jan 6, 2020
@htuch htuch removed the help wanted Needs help! label Jan 6, 2020
@htuch htuch added this to the 1.13.0 milestone Jan 6, 2020
@htuch htuch added the api/v3 Major version release @ end of Q3 2019 label Jan 6, 2020
htuch added a commit to htuch/envoy that referenced this issue Jan 6, 2020
Previously, type_to_endpoint.cc had a lot of hardcoding, which doesn't scale well with multiple API
versions. See envoyproxy#9526 for an example of the issues
encountered.

This patch switches to using explicit resource type annotations on service descriptors, which is
great for documentation (previously this was sometimes given in comments, sometimes not), and allows
for a reflection driven reverse map from resource type URL to endpoints to be built at runtime.

Risk level: Low
Testing: New unit tests for type_to_endpoint.cc and golden protoxform tests for the new annotations.

Fixes envoyproxy#9454.

Signed-off-by: Harvey Tuch <htuch@google.com>
htuch added a commit that referenced this issue Jan 6, 2020
#9566)

Previously, type_to_endpoint.cc had a lot of hardcoding, which doesn't scale well with multiple API
versions. See #9526 for an example of the issues
encountered.

This patch switches to using explicit resource type annotations on service descriptors, which is
great for documentation (previously this was sometimes given in comments, sometimes not), and allows
for a reflection driven reverse map from resource type URL to endpoints to be built at runtime.

Risk level: Low
Testing: New unit tests for type_to_endpoint.cc and golden protoxform tests for the new annotations.

Fixes #9454.

Signed-off-by: Harvey Tuch <htuch@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api/v3 Major version release @ end of Q3 2019 area/xds enhancement Feature requests. Not bugs or questions.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant