You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API_VERSIONING doc has a couple of exceptions for the compatibility policy:
Changes made within 14 days of the introduction of a new API field or message.
API versions tagged vNalpha. Within an alpha major version, arbitrary breaking changes are allowed.
In (1), even if the 14 days has not elapsed, and API might still be included in an official Envoy release. In this case, can we make it clear that once included in a release, the API is subject to compatibility?
In (2), if a v1alpha API can be changed in any way at any time, how can a control plane ever feel safe experimenting with it? As a control plane author, this is telling me that an alpha API can have breaking changes with no way for me to handle the transition. Does this mean that an API at the samev1alpha2 version can be completely incompatible between Envoy versions?
Finally, as a blanket rule, can we ban re-use of field numbers? AFAICT, this makes is difficult to impossible for a control plane to track API changes across Envoy versions. If a breaking change is needed, then dropping support for a field number (but not re-using that number), still makes it possible for me to carry a patch where I can serve different field numbers to different Envoy versions.
I agree about (1). Please raise a PR to adjust this text.
I think (2) is going to require a lot more thinking. I agree that with breaking changes we are going to reduce the chance that people will experiment with the API. So this leaves us with:
Just stop doing alpha and admit that all APIs are basically final (I'm getting pretty close to leaning in this direction myself)
Do alpha, but avoid breaking changes, and then have some official policy for locking in the move to non-alpha. (Rename just to connote stability and possibly clean up deprecated fields while still reserving them.)
I agree about (1). Please raise a PR to adjust this text.
I think (2) is going to require a lot more thinking. I agree that with breaking changes we are going to reduce the chance that people will experiment with the API.
I do think that is is OK for alpha APIs to spend less on compatibility than major version APIs. People adopting them should be prepared to do at least some transition work across Envoy releases. I'm not sure how to couch it in spec language, but breakages are OK as long as you can migrate between Envoy releases.
My basic thinking is that alpha APIs are unfit for use in production systems and control planes should not support them in situations when you need to do things like binary upgrades. This aligns with @mattklein123 take that basically all APIs are final. The question is how do we enforce this for contrib/?
In any case, I think whatever rules we adopt have to be machine enforced with buf. We're past the point that humans can consistently enforce them in a scalable way across the full surface.
I also agree that at the moment anything added as alpha is essentially final. I think that typically alpha/beta is used for a specific version release of a binary, during which the API can change. However, this makes little sense in how Envoy's versioning works as the binary version is orthogonal to the API version.
For contrib/ I think the bar is much lower, and it is up to a contributor to set their API as alpha or not.
Using alpha implies that the API may introduce breaking changes, and this might be ok in use-cases where the extension depends on something very dynamic and it may not be clear up-front. The users of an alpha extension essentially agree that the API may break.
Once the API is final, or if there's sufficient community around it, the API can move to non-alpha mode. This is also required when moving it from a contrib to a regular extension.
Perhaps a middle ground for alpha APIs is to be more aggressive about incrementing version numbers. Rather than making changes to v1alpha1 that are not wire-compatible, leave v1alpha1 in place N and make the change in v1alpha2. Envoy doesn't need to support both versions, but would continue to ship the protobufs (because go-control-plane isn't strongly bound to Envoy releases). Then control planes can pick the right version of the alpha API to serve to the right version on Envoy if they need to.
My basic thinking is that alpha APIs are unfit for use in production systems and control planes should not support them in situations when you need to do things like binary upgrades.
IME, the envoy project has been really good at API compatibility, so it's easy to make the same assumptions about alpha APIs :)
Having thought about this a bit more, I would vote for one of two extreme options:
No more alpha outside of contrib.
Alpha outside of contrib is allowed during development of a feature, but there is a extremely clear understanding that alpha APIs are not stable, should not be used in production, and if someone wants to use a feature in production they need to say so so we can move the API to non alpha.
We have run into alpha -> non-alpha problems often enough that I think it's time to do away with it or be much more explicit about what guarantees there are.
Activity
mattklein123 commentedon Aug 31, 2021
cc @envoyproxy/api-shepherds
I agree about (1). Please raise a PR to adjust this text.
I think (2) is going to require a lot more thinking. I agree that with breaking changes we are going to reduce the chance that people will experiment with the API. So this leaves us with:
Thoughts?
jpeach commentedon Aug 31, 2021
I do think that is is OK for alpha APIs to spend less on compatibility than major version APIs. People adopting them should be prepared to do at least some transition work across Envoy releases. I'm not sure how to couch it in spec language, but breakages are OK as long as you can migrate between Envoy releases.
htuch commentedon Sep 1, 2021
My basic thinking is that alpha APIs are unfit for use in production systems and control planes should not support them in situations when you need to do things like binary upgrades. This aligns with @mattklein123 take that basically all APIs are final. The question is how do we enforce this for
contrib/?In any case, I think whatever rules we adopt have to be machine enforced with
buf. We're past the point that humans can consistently enforce them in a scalable way across the full surface.adisuissa commentedon Sep 1, 2021
I also agree that at the moment anything added as alpha is essentially final. I think that typically alpha/beta is used for a specific version release of a binary, during which the API can change. However, this makes little sense in how Envoy's versioning works as the binary version is orthogonal to the API version.
For
contrib/I think the bar is much lower, and it is up to a contributor to set their API as alpha or not.Using alpha implies that the API may introduce breaking changes, and this might be ok in use-cases where the extension depends on something very dynamic and it may not be clear up-front. The users of an alpha extension essentially agree that the API may break.
Once the API is final, or if there's sufficient community around it, the API can move to non-alpha mode. This is also required when moving it from a
contribto a regularextension.jpeach commentedon Sep 1, 2021
Perhaps a middle ground for alpha APIs is to be more aggressive about incrementing version numbers. Rather than making changes to v1alpha1 that are not wire-compatible, leave v1alpha1 in place N and make the change in v1alpha2. Envoy doesn't need to support both versions, but would continue to ship the protobufs (because go-control-plane isn't strongly bound to Envoy releases). Then control planes can pick the right version of the alpha API to serve to the right version on Envoy if they need to.
jpeach commentedon Sep 1, 2021
IME, the envoy project has been really good at API compatibility, so it's easy to make the same assumptions about alpha APIs :)
mattklein123 commentedon Sep 1, 2021
Having thought about this a bit more, I would vote for one of two extreme options:
We have run into alpha -> non-alpha problems often enough that I think it's time to do away with it or be much more explicit about what guarantees there are.
Thoughts?
lizan commentedon Sep 1, 2021
I'm leaning to 1. as we have contrib now, new extensions can be started in contrib during its development and then moved into main if there's desire.
mattklein123 commentedon Sep 1, 2021
Yes (1) is my vote also.
25 remaining items
api: remove [:alpha] protodoc tag and replace with annotation (#18218)
config: warn on wip annotations
config: warn on wip annotations (#18279)
api: force migrate v3alpha -> v3
api: force migrate v3alpha -> v3 (#18392)
api: force migrate v3alpha -> v3 (#18392)
api: remove [:alpha] protodoc tag and replace with annotation (envoyp…