config: C++ proto reflection based conversion of vN -> v(N+1)alpha.#8431
config: C++ proto reflection based conversion of vN -> v(N+1)alpha.#8431htuch merged 10 commits intoenvoyproxy:masterfrom
Conversation
The basic idea is that vN and v(N+1)alpha messages of the same name are duck typed and reflection is used to upgrade from vN to v(N+1)alpha. v(N+1) now has an Any field (when a deprecation has happened) to smuggle the vN deprecated fields across for any code that might still depend on it. Risk level: Low (unused library) Testing: Unit tests added. Signed-off-by: Harvey Tuch <htuch@google.com>
|
Do we really need the |
Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Harvey Tuch <htuch@google.com>
| ASSERT(target_field_descriptor != nullptr); | ||
|
|
||
| // These properties are guaranteed by protoxform. | ||
| ASSERT(prev_field_descriptor->type() == target_field_descriptor->type()); |
There was a problem hiding this comment.
Is there anyway we can check whether the descriptor of next_message is translated by protoxform from that of prev_message? This seems generally true for configs in this repo but not outside.
There was a problem hiding this comment.
I think this will be done by code outside of the version converter.. e.g. the HCM filter factory instantiation will need to be explicitly aware of the envoy.foo.v2, envoy.foo.v3alpha, envoy.foo.v4 structure to be able to stage a series of upgrades anyway, so there will be some additional code to recognize types that are in the core Envoy API/UDPA and interpret the version numbers.
Signed-off-by: Harvey Tuch <htuch@google.com>
…nvoyproxy#8431) The basic idea is that vN and v(N+1)alpha messages of the same name are duck typed and reflection is used to upgrade from vN to v(N+1)alpha. v(N+1) now has an Any field (when a deprecation has happened) to smuggle the vN deprecated fields across for any code that might still depend on it. Risk level: Low (unused library) Testing: Unit tests added. Signed-off-by: Harvey Tuch <htuch@google.com>
The basic idea is that vN and v(N+1)alpha messages of the same name are
duck typed and reflection is used to upgrade from vN to v(N+1)alpha.
v(N+1) now has an Any field (when a deprecation has happened) to smuggle
the vN deprecated fields across for any code that might still depend on
it.
Risk level: Low (unused library)
Testing: Unit tests added.
Signed-off-by: Harvey Tuch htuch@google.com