@@ -7,26 +7,22 @@ stability.
7
7
8
8
# API semantic versioning
9
9
10
- The Envoy APIs consist of a family of packages, e.g. ` envoy.admin.v2alpha ` ,
11
- ` envoy.service.trace.v2 ` . Each package is independently versioned with a protobuf semantic
10
+ The Envoy APIs consist of a family of packages, e.g. ` envoy.admin.v3alpha ` ,
11
+ ` envoy.service.trace.v3 ` . Each package is independently versioned with a protobuf semantic
12
12
versioning scheme based on https://cloud.google.com/apis/design/versioning .
13
13
14
- The major version for a package is captured in its name (and directory structure). E.g. version 2
15
- of the tracing API package is named ` envoy.service.trace.v2 ` and its constituent protos are located
16
- in ` api/envoy/service/trace/v2 ` . Every protobuf must live directly in a versioned package namespace,
17
- we do not allow subpackages such as ` envoy.service.trace.v2.somethingelse ` .
18
-
19
- Minor and patch versions will be implemented in the future, this effort is tracked in
20
- https://github.com/envoyproxy/envoy/issues/8416 .
14
+ The major version for a package is captured in its name (and directory structure). E.g. version 3
15
+ of the tracing API package is named ` envoy.service.trace.v3 ` and its constituent protos are located
16
+ in ` api/envoy/service/trace/v3 ` . Every protobuf must live directly in a versioned package namespace,
17
+ we do not allow subpackages such as ` envoy.service.trace.v3.somethingelse ` .
21
18
22
19
In everyday discussion and GitHub labels, we refer to the ` v2 ` , ` v3 ` , ` vN ` , ` ... ` APIs. This has a
23
20
specific technical meaning. Any given message in the Envoy API, e.g. the ` Bootstrap ` at
24
21
` envoy.config.bootstrap.v3.Bootstrap ` , will transitively reference a number of packages in the Envoy
25
22
API. These may be at ` vN ` , ` v(N-1) ` , etc. The Envoy API is technically a DAG of versioned package
26
23
namespaces. When we talk about the ` vN xDS API ` , we really refer to the ` N ` of the root
27
24
configuration resources (e.g. bootstrap, xDS resources such as ` Cluster ` ). The
28
- v3 API bootstrap configuration is ` envoy.config.bootstrap.v3.Bootstrap ` , even
29
- though it might transitively reference ` envoy.service.trace.v2 ` .
25
+ v3 API bootstrap configuration is ` envoy.config.bootstrap.v3.Bootstrap ` .
30
26
31
27
# Backwards compatibility
32
28
@@ -82,57 +78,18 @@ implementations within a major version should set explicit values for these fiel
82
78
83
79
# API lifecycle
84
80
85
- A new major version is a significant event in the xDS API ecosystem, inevitably requiring support
86
- from clients (Envoy, gRPC) and a large number of control planes, ranging from simple in-house custom
87
- management servers to xDS-as-a-service offerings run by vendors. The [ xDS API
88
- shepherds] ( https://github.com/orgs/envoyproxy/teams/api-shepherds ) will make the decision to add a
89
- new major version subject to the following constraints:
90
- * There exists sufficient technical debt in the xDS APIs in the existing supported major version
91
- to justify the cost burden for xDS client/server implementations.
92
- * At least one year has elapsed since the last major version was cut.
93
- * Consultation with the Envoy community (via Envoy community call, ` #xds ` channel on Slack), as
94
- well as gRPC OSS community (via reaching out to language maintainers) is made. This is not a veto
95
- process; the API shepherds retain the right to move forward with a new major API version after
96
- weighing this input with the first two considerations above.
97
-
98
- Following the release of a new major version, the API lifecycle follows a deprecation clock.
99
- Envoy will support at most three major versions of any API package at all times:
100
- * The current stable major version, e.g. v3.
101
- * The previous stable major version, e.g. v2. This is needed to ensure that we provide at least 1
102
- year for a supported major version to sunset. By supporting two stable major versions
103
- simultaneously, this makes it easier to coordinate control plane and Envoy
104
- rollouts as well. This previous stable major version will be supported for exactly 1
105
- year after the introduction of the new current stable major version, after which it will be
106
- removed from the Envoy implementation.
107
- * Optionally, the next experimental alpha major version, e.g. v4alpha. This is a release candidate
108
- for the next stable major version. This is only generated when the current stable major version
109
- requires a breaking change at the next cycle, e.g. a deprecation or field rename. This release
110
- candidate is mechanically generated via the
111
- [ protoxform] ( https://github.com/envoyproxy/envoy/tree/main/tools/protoxform ) tool from the
112
- current stable major version, making use of annotations such as ` deprecated = true ` . This is not a
113
- human editable artifact.
114
-
115
- An example of how this might play out is that at the end of December in 2020, if a v4 major version
116
- is justified, we might freeze
117
- ` envoy.config.bootstrap.v4alpha ` and this package would then become the current stable major version
118
- ` envoy.config.bootstrap.v4 ` . The ` envoy.config.bootstrap.v3 ` package will become the previous stable
119
- major version and support for ` envoy.config.bootstrap.v2 ` will be dropped from the Envoy
120
- implementation. Note that some transitively referenced package, e.g.
121
- ` envoy.config.filter.network.foo.v2 ` may remain at version 2 during this release, if no changes were
122
- made to the referenced package. If no major version is justified at this point, the decision to cut
123
- v4 might occur at some point in 2021 or beyond, however v2 support will still be removed at the end
124
- of 2020.
125
-
126
- The implication of this API lifecycle and clock is that any deprecated feature in the Envoy API will
127
- retain implementation support for at least 1-2 years.
128
-
129
- We are currently working on a strategy to introduce minor versions
130
- (https://github.com/envoyproxy/envoy/issues/8416 ). This will bump the xDS API minor version on every
131
- deprecation and field introduction/modification. This will provide an opportunity for the control
132
- plane to condition on client and major/minor API version support. Currently under discussion, but
133
- not finalized will be the sunsetting of Envoy client support for deprecated features after a year
134
- of support within a major version. Please post to https://github.com/envoyproxy/envoy/issues/8416
135
- any thoughts around this.
81
+ At one point, the Envoy project planned for regular major version updates to the xDS API in order to
82
+ remove technical debt. At this point we recognize that Envoy and the larger xDS ecosystem (gRPC,
83
+ etc.) is too widely used to make version bumps realistic. As such, for practical purposes, the v3
84
+ API is the final major version of the API and will be supported forever. Deprecations will still
85
+ occur as an end-user indication that there is a preferred way to configure a particular feature, but
86
+ no field will ever be removed nor will Envoy ever remove the implementation for any deprecated
87
+ field.
88
+
89
+ ** NOTE** : Client implementations are free to output additional warnings about field usage beyond
90
+ deprecation, if for example, the use of the continued use of the field is deemed a substantial
91
+ security risk. Individual client versions are also free to stop supporting fields if they want to,
92
+ though Envoy Proxy (as an xDS client) commits to never doing so.
136
93
137
94
# New API features
138
95
@@ -147,45 +104,6 @@ only be made to the *current stable major version*. The rationale for this polic
147
104
* We encourage Envoy users to move to the current stable major version from the previous one to
148
105
consume new functionality.
149
106
150
- # When can an API change be made to a package's previous stable major version?
151
-
152
- As a pragmatic concession, we allow API feature additions to the previous stable major version for a
153
- single quarter following a major API version increment. Any changes to the previous stable major
154
- version must be manually reflected in a consistent manner in the current stable major version as
155
- well.
156
-
157
- # How to make a breaking change across major versions
158
-
159
- We maintain [ backwards compatibility] ( #backwards-compatibility ) within a major version but allow
160
- breaking changes across major versions. This enables API deprecations, cleanups, refactoring and
161
- reorganization. The Envoy APIs have a stylized workflow for achieving this. There are two prescribed
162
- methods, depending on whether the change is mechanical or manual.
163
-
164
- ## Mechanical breaking changes
165
-
166
- Field deprecations, renames, etc. are mechanical changes that are supported by the
167
- [ protoxform] ( https://github.com/envoyproxy/envoy/tree/main/tools/protoxform ) tool. These are
168
- guided by [ annotations] ( STYLE.md#api-annotations ) .
169
-
170
- ## Manual breaking changes
171
-
172
- A manual breaking change is distinct from the mechanical changes such as field deprecation, since in
173
- general it requires new code and tests to be implemented in Envoy by hand. For example, if a developer
174
- wants to unify ` HeaderMatcher ` with ` StringMatcher ` in the route configuration, this is a likely
175
- candidate for this class of change. The following steps are required:
176
- 1 . The new version of the feature, e.g. the ` NewHeaderMatcher ` message should be added, together
177
- with referencing fields, in the current stable major version for the route configuration proto.
178
- 2 . The Envoy implementation should be changed to consume configuration from the fields added in (1).
179
- Translation code (and tests) should be written to map from the existing field and messages to
180
- (1).
181
- 3 . The old message/enum/field/enum value should be annotated as deprecated.
182
- 4 . At the next major version, ` protoxform ` will remove the deprecated version automatically.
183
-
184
- This make-before-break approach ensures that API major version releases are predictable and
185
- mechanical, and has the bulk of the Envoy code and test changes owned by feature developers, rather
186
- than the API owners. There will be no major ` vN ` initiative to address technical debt beyond that
187
- enabled by the above process.
188
-
189
107
# Client features
190
108
191
109
Not all clients will support all fields and features in a given major API version. In general, it is
@@ -203,34 +121,3 @@ This approach does not always work, for example:
203
121
For this purpose, we have [ client
204
122
features] ( https://www.envoyproxy.io/docs/envoy/latest/api/client_features ) .
205
123
206
- # One Definition Rule (ODR)
207
-
208
- To avoid maintaining more than two stable major versions of a package, and to cope with diamond
209
- dependency, we add a restriction on how packages may be referenced transitively; a package may have
210
- at most one version of another package in its transitive dependency set. This implies that some
211
- packages will have a major version bump during a release cycle simply to allow them to catch up to
212
- the current stable version of their dependencies.
213
-
214
- Some of this complexity and churn can be avoided by having strict rules on how packages may
215
- reference each other. Package organization and ` BUILD ` visibility constraints should be used
216
- restrictions to maintain a shallow depth in the dependency tree for any given package.
217
-
218
- # Minimizing the impact of churn
219
-
220
- In addition to stability, the API versioning policy has an explicit goal of minimizing the developer
221
- overhead for the Envoy community, other clients of the APIs (e.g. gRPC), management server vendors
222
- and the wider API tooling ecosystem. A certain amount of API churn between major versions is
223
- desirable to reduce technical debt and to support API evolution, but too much creates costs and
224
- barriers to upgrade.
225
-
226
- We consider deprecations to be * mandatory changes* . Any deprecation will be removed at the next
227
- stable API version.
228
-
229
- Other mechanical breaking changes are considered * discretionary* . These include changes such as
230
- field renames and are largely reflected in protobuf comments. The ` protoxform ` tool may decide to
231
- minimize API churn by deferring application of discretionary changes until a major version cycle
232
- where the respective message is undergoing a mandatory change.
233
-
234
- The Envoy API structure helps with minimizing churn between versions. Developers should architect
235
- and split packages such that high churn protos, e.g. HTTP connection manager, are isolated in
236
- packages and have a shallow reference hierarchy.
0 commit comments