Move E/C/R/LDS service definitions to prevent breaking existing management servers#438
Conversation
Signed-off-by: Kuat Yessenov <kuat@google.com>
|
This seems like a great compromise to me. @junr03 can you confirm this will work for us? |
|
Envoy update envoyproxy/envoy#2468 |
|
@kyessenov I was just talking to @junr03 and I think we were wrong. I think all APIs do use the |
|
I just looked at this in a little more detail and I'm pretty sure that we use Assuming this is true I guess the options are:
@htuch since you actually know how all this works WDYT? |
|
@mattklein123 The The compatibility issue only exists with the top-level resource object, e.g. |
| @@ -2,91 +2,20 @@ load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library" | |||
|
|
|||
| licenses(["notice"]) # Apache 2 | |||
There was a problem hiding this comment.
We should probably leave a note explaining why only ADS/HDS/SDS live here for posterity.
|
Yeah. I think for the JSON/YAML v2 story, since we're the only ones ingesting it, we could do an Envoy-side translation of the type annotation. This is technically a JSON/YAML wire format breaking change, since if we had someone else making use of JSON/YAML ingest of these APIs via the data-plane-api definition, it wouldn't be great, but I think we're the only major consumer. I think it comes down to how comfortable we are that we won't breaking any other consumers vs. the win of not having to undo the neat namespace moves in the earlier PR and providing a good framework for future growth here. |
|
Thinking about this a bit more, I think translation in Envoy is not viable. This is because with the I think we need to maintain true backwards compatibility here and move the top-level objects (just |
|
I had a look through the protobuf source. I think we're actually safe from breaking Envoy ingest with type URLs (needs verifying though), with both JSON/YAML And protobuf binary formats, since we always know what type we are unpacking to. The type URL is used in some places, for example message differencing, and might technically be used by other consumers of the Envoy API. Technically we've broken wire compatibility here, but I don't think this will have real world consequences. Hence, we can leave it as is. The easiest way to verify is to run the |
|
Actually, I know this won't work everywhere from some code inspection; https://github.com/envoyproxy/envoy/blob/899ed8af8904ea61f723e95a7d89c17cadc00c69/source/common/config/grpc_mux_subscription_impl.h#L27. We're making use of type URLs when demuxing ADS streams. |
|
This is a breaking change per proto3 spec. The question is whether we can
fix all our code to work around the breaking change. If Envoy is used by
more than Lyft and Google, there is no chance we can make it work.
Companies have to update their running services in proper order to accept
the breaking change, which is too difficult.
Do we know if any code written by other companies using these protos,
especially via Any?
|
|
Even within Envoy, to fix this we would need to introduce the ability to alias type URLs in various places to cope with management servers that produce both old and new type URLs. It's doable, but it's pretty ugly. |
|
In that case, we can only move unused packages and leave everything else as is. |
|
I don't think this is true. Only things that can be directly embedded in the DiscoveryResponse |
That's my assessment also, but since this is ridiculously confusing perhaps we could test? My preference at this point is to just move the APIs and top level message types back, and leave everything else. I agree we could modify Envoy to do translation of the type name, but I'm not sure it's worth it. I don't feel that strongly about it though. This namespacing move is a huge improvement which we are going to live with for years. I think we should push forward as best we can. |
|
I agree we should move top-level elements back to un-break things, then we
can iterate from a working state. I need a few days to make sure any
production system is still working well, including things like logging,
monitoring, analytics. Such secondary dependencies may also depend on
certain names.
In general, we should make a pilot change for large scale refactoring, so
we don't cause too much churns at once.
|
|
There is no Google production use yet @wora, so we mostly need to consider
Lyft and other 3rd parties.
…On Sun, Jan 28, 2018 at 4:14 PM Hong Zhang ***@***.***> wrote:
I agree we should move top-level elements back to un-break things, then we
can iterate from a working state. I need a few days to make sure any
production system is still working well, including things like logging,
monitoring, analytics. Such secondary dependencies may also depend on
certain names.
In general, we should make a pilot change for large scale refactoring, so
we don't cause too much churns at once.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#438 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKaLv93pnnYDK_hoDuXS7upRruFGpDIDks5tPOMbgaJpZM4RvCUw>
.
|
|
I think type aliasing might ultimately end up causing more harm than benefit, so let's move top-level Cluster/Route/Listener/ClusterLoadAssignment back to the old package, since that's the simplest and intuitive way things should operate. I will leave a note explaining why xDS is split in half, and we can fix in later revisions. In terms of impact, Istio is not affected since it uses v1 APIs. go-control-plane can be transitioned smoothly since the library hides the types, assuming the proxy is updated in lock-step. |
|
The only other project I know for sure is using v2 APIs is Contour. There are probably others. @kyessenov I like that plan. It's not optimal, but it's still way better than what we have today. |
|
While we're still hanging out on this thread, I wonder if |
|
@htuch I do want to organize filters, just not in the same PR that touches the core APIs. |
|
@kyessenov SGTM, makes sense. |
Signed-off-by: Kuat Yessenov <kuat@google.com>
|
PTAL: I moved the top-level types for E/C/R/LDS back to the envoy.api.v2 package. |
mattklein123
left a comment
There was a problem hiding this comment.
LGTM, thanks for slogging through this.
|
Submitted envoyproxy/envoy#2472 to align the API change. |
This change moves definitions of EDS, CDS, RDS, LDS back to package
envoy.api.v2to prevent incompatible changes with the existing management services for these discovery APIs. New discovery APIs and extensions should be added to the correct location inenvoy.service.discovery.v2.Top-level request/response messages are also placed next to xDS in the original package
envoy.api.v2. This is due to the fact that protobuf reflection usingprotobuf.Anyfixes the proto package for these messages. These messages are Cluster, RouteConfiguration, ClusterLoadAssignment, Listener.Signed-off-by: Kuat Yessenov kuat@google.com