Skip to content

Commit b1720f1

Browse files
authored
xds: Envoy proto sync to 2022-04-08 (#9101)
Proto updates: - cncf/xds: Sort xds/import.sh protos alphabetically - cncf/xds: Sync protos to cncf/xds@d92e9ce (commit 2021-12-16, corresponding to envoy cl/440193522). It's a no-op for used protos, but helpful to import the latest matcher.proto - cncf/xds: Import xds/type/matcher/v3/matcher.proto with dependencies - envoyproxy/protoc-gen-validate: Sync protos to bufbuild/protoc-gen-validate@dfcdc5e (commit 2022-03-10, corresponding to envoy cl/440193522) to pick up ignore_empty field required for the following envoy sync - envoyproxy/envoy Sync protos to envoyproxy/envoy@e33f444 (commit 2022-04-07, cl/440193522). This is the minimal version needed to pick up ClusterSpecifierPlugin.is_optional. a. Generated code: AggregatedDiscoveryServiceGrpc was regenerated from the updated proto. This is a no-op, just a minor change to the docblocks. b. Deprecated fields had to be taken care of manually, see "Manual updates to the code" below. - envoyproxy/envoy Sync protos to the latest imported version envoyproxy/envoy@5d74719 (commit 2022-04-08, cl/443359189). Not needed for anything specific, just the last version, and was easy to import. Manual updates to the code as the result of envoyproxy/envoy@e33f444 sync: - Deprecated ConfigSource.path replaced with the ConfigSource.path_config_source in test fake resources. The ConfigSource.path isn't in active code paths, so no prod code changes needed. - Suppress CertificateValidationContext.match_subject_alt_names deprecations in test files. Surprisingly, we don't report deprecations in prod files, despite the fact this field is used in prod code a few times.
1 parent 538db03 commit b1720f1

File tree

159 files changed

+1329
-246
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+1329
-246
lines changed

xds/src/generated/main/grpc/io/envoyproxy/envoy/service/discovery/v2/AggregatedDiscoveryServiceGrpc.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* <pre>
7-
* See https://github.com/lyft/envoy-api#apis for a description of the role of
7+
* See https://github.com/envoyproxy/envoy-api#apis for a description of the role of
88
* ADS and how it is intended to be used by a management server. ADS requests
99
* have the same structure as their singleton xDS counterparts, but can
1010
* multiplex many resource types on a single stream. The type_url in the
@@ -131,7 +131,7 @@ public AggregatedDiscoveryServiceFutureStub newStub(io.grpc.Channel channel, io.
131131

132132
/**
133133
* <pre>
134-
* See https://github.com/lyft/envoy-api#apis for a description of the role of
134+
* See https://github.com/envoyproxy/envoy-api#apis for a description of the role of
135135
* ADS and how it is intended to be used by a management server. ADS requests
136136
* have the same structure as their singleton xDS counterparts, but can
137137
* multiplex many resource types on a single stream. The type_url in the
@@ -180,7 +180,7 @@ public io.grpc.stub.StreamObserver<io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequ
180180

181181
/**
182182
* <pre>
183-
* See https://github.com/lyft/envoy-api#apis for a description of the role of
183+
* See https://github.com/envoyproxy/envoy-api#apis for a description of the role of
184184
* ADS and how it is intended to be used by a management server. ADS requests
185185
* have the same structure as their singleton xDS counterparts, but can
186186
* multiplex many resource types on a single stream. The type_url in the
@@ -222,7 +222,7 @@ public io.grpc.stub.StreamObserver<io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequ
222222

223223
/**
224224
* <pre>
225-
* See https://github.com/lyft/envoy-api#apis for a description of the role of
225+
* See https://github.com/envoyproxy/envoy-api#apis for a description of the role of
226226
* ADS and how it is intended to be used by a management server. ADS requests
227227
* have the same structure as their singleton xDS counterparts, but can
228228
* multiplex many resource types on a single stream. The type_url in the
@@ -245,7 +245,7 @@ protected AggregatedDiscoveryServiceBlockingStub build(
245245

246246
/**
247247
* <pre>
248-
* See https://github.com/lyft/envoy-api#apis for a description of the role of
248+
* See https://github.com/envoyproxy/envoy-api#apis for a description of the role of
249249
* ADS and how it is intended to be used by a management server. ADS requests
250250
* have the same structure as their singleton xDS counterparts, but can
251251
* multiplex many resource types on a single stream. The type_url in the

xds/src/generated/main/grpc/io/envoyproxy/envoy/service/discovery/v3/AggregatedDiscoveryServiceGrpc.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* <pre>
7-
* See https://github.com/lyft/envoy-api#apis for a description of the role of
7+
* See https://github.com/envoyproxy/envoy-api#apis for a description of the role of
88
* ADS and how it is intended to be used by a management server. ADS requests
99
* have the same structure as their singleton xDS counterparts, but can
1010
* multiplex many resource types on a single stream. The type_url in the
@@ -131,7 +131,7 @@ public AggregatedDiscoveryServiceFutureStub newStub(io.grpc.Channel channel, io.
131131

132132
/**
133133
* <pre>
134-
* See https://github.com/lyft/envoy-api#apis for a description of the role of
134+
* See https://github.com/envoyproxy/envoy-api#apis for a description of the role of
135135
* ADS and how it is intended to be used by a management server. ADS requests
136136
* have the same structure as their singleton xDS counterparts, but can
137137
* multiplex many resource types on a single stream. The type_url in the
@@ -180,7 +180,7 @@ public io.grpc.stub.StreamObserver<io.envoyproxy.envoy.service.discovery.v3.Delt
180180

181181
/**
182182
* <pre>
183-
* See https://github.com/lyft/envoy-api#apis for a description of the role of
183+
* See https://github.com/envoyproxy/envoy-api#apis for a description of the role of
184184
* ADS and how it is intended to be used by a management server. ADS requests
185185
* have the same structure as their singleton xDS counterparts, but can
186186
* multiplex many resource types on a single stream. The type_url in the
@@ -222,7 +222,7 @@ public io.grpc.stub.StreamObserver<io.envoyproxy.envoy.service.discovery.v3.Delt
222222

223223
/**
224224
* <pre>
225-
* See https://github.com/lyft/envoy-api#apis for a description of the role of
225+
* See https://github.com/envoyproxy/envoy-api#apis for a description of the role of
226226
* ADS and how it is intended to be used by a management server. ADS requests
227227
* have the same structure as their singleton xDS counterparts, but can
228228
* multiplex many resource types on a single stream. The type_url in the
@@ -245,7 +245,7 @@ protected AggregatedDiscoveryServiceBlockingStub build(
245245

246246
/**
247247
* <pre>
248-
* See https://github.com/lyft/envoy-api#apis for a description of the role of
248+
* See https://github.com/envoyproxy/envoy-api#apis for a description of the role of
249249
* ADS and how it is intended to be used by a management server. ADS requests
250250
* have the same structure as their singleton xDS counterparts, but can
251251
* multiplex many resource types on a single stream. The type_url in the

xds/src/test/java/io/grpc/xds/ClientXdsClientDataTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import io.envoyproxy.envoy.config.core.v3.DataSource;
4545
import io.envoyproxy.envoy.config.core.v3.HttpProtocolOptions;
4646
import io.envoyproxy.envoy.config.core.v3.Locality;
47+
import io.envoyproxy.envoy.config.core.v3.PathConfigSource;
4748
import io.envoyproxy.envoy.config.core.v3.RuntimeFractionalPercent;
4849
import io.envoyproxy.envoy.config.core.v3.SelfConfigSource;
4950
import io.envoyproxy.envoy.config.core.v3.SocketAddress;
@@ -1616,7 +1617,8 @@ public void parseHttpConnectionManager_validateRdsConfigSource() throws Exceptio
16161617
.setRds(Rds.newBuilder()
16171618
.setRouteConfigName("rds-config-foo")
16181619
.setConfigSource(
1619-
ConfigSource.newBuilder().setPath("foo-path")))
1620+
ConfigSource.newBuilder()
1621+
.setPathConfigSource(PathConfigSource.newBuilder().setPath("foo-path"))))
16201622
.build();
16211623
thrown.expect(ResourceInvalidException.class);
16221624
thrown.expectMessage(
@@ -1822,7 +1824,7 @@ public void parseCluster_validateEdsSourceConfig() throws ResourceInvalidExcepti
18221824
EdsClusterConfig.newBuilder()
18231825
.setEdsConfig(
18241826
ConfigSource.newBuilder()
1825-
.setPath("foo-path"))
1827+
.setPathConfigSource(PathConfigSource.newBuilder().setPath("foo-path")))
18261828
.setServiceName("service-foo.googleapis.com"))
18271829
.setLbPolicy(LbPolicy.ROUND_ROBIN)
18281830
.build();

xds/src/test/java/io/grpc/xds/internal/certprovider/CertProviderServerSslContextProviderTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ public void testProviderForServer_mtls_newXds() throws Exception {
177177
new CertificateProvider.DistributorWatcher[1];
178178
TestCertificateProvider.createAndRegisterProviderProvider(
179179
certificateProviderRegistry, watcherCaptor, "testca", 0);
180+
@SuppressWarnings("deprecation")
180181
CertificateValidationContext staticCertValidationContext =
181182
CertificateValidationContext.newBuilder().addAllMatchSubjectAltNames(Arrays
182183
.asList(StringMatcher.newBuilder().setExact("foo.com").build(),

xds/src/test/java/io/grpc/xds/internal/sds/ClientSslContextProviderFactoryTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ public void createCertProviderClientSslContextProvider_withStaticContext()
152152
final CertificateProvider.DistributorWatcher[] watcherCaptor =
153153
new CertificateProvider.DistributorWatcher[1];
154154
createAndRegisterProviderProvider(certificateProviderRegistry, watcherCaptor, "testca", 0);
155+
@SuppressWarnings("deprecation")
155156
CertificateValidationContext staticCertValidationContext =
156157
CertificateValidationContext.newBuilder()
157158
.addAllMatchSubjectAltNames(
@@ -216,6 +217,7 @@ public void createNewCertProviderClientSslContextProvider_withSans() {
216217
createAndRegisterProviderProvider(
217218
certificateProviderRegistry, watcherCaptor, "file_watcher", 1);
218219

220+
@SuppressWarnings("deprecation")
219221
CertificateValidationContext staticCertValidationContext =
220222
CertificateValidationContext.newBuilder()
221223
.addAllMatchSubjectAltNames(
@@ -248,6 +250,7 @@ public void createNewCertProviderClientSslContextProvider_onlyRootCert() {
248250
final CertificateProvider.DistributorWatcher[] watcherCaptor =
249251
new CertificateProvider.DistributorWatcher[1];
250252
createAndRegisterProviderProvider(certificateProviderRegistry, watcherCaptor, "testca", 0);
253+
@SuppressWarnings("deprecation")
251254
CertificateValidationContext staticCertValidationContext =
252255
CertificateValidationContext.newBuilder()
253256
.addAllMatchSubjectAltNames(

xds/src/test/java/io/grpc/xds/internal/sds/ServerSslContextProviderFactoryTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public void createCertProviderServerSslContextProvider_withStaticContext()
149149
final CertificateProvider.DistributorWatcher[] watcherCaptor =
150150
new CertificateProvider.DistributorWatcher[1];
151151
createAndRegisterProviderProvider(certificateProviderRegistry, watcherCaptor, "testca", 0);
152+
@SuppressWarnings("deprecation")
152153
CertificateValidationContext staticCertValidationContext =
153154
CertificateValidationContext.newBuilder()
154155
.addAllMatchSubjectAltNames(
@@ -215,6 +216,7 @@ public void createNewCertProviderServerSslContextProvider_withSans()
215216
createAndRegisterProviderProvider(certificateProviderRegistry, watcherCaptor, "testca", 0);
216217
createAndRegisterProviderProvider(
217218
certificateProviderRegistry, watcherCaptor, "file_watcher", 1);
219+
@SuppressWarnings("deprecation")
218220
CertificateValidationContext staticCertValidationContext =
219221
CertificateValidationContext.newBuilder()
220222
.addAllMatchSubjectAltNames(

xds/src/test/java/io/grpc/xds/internal/sds/trust/SdsTrustManagerFactoryTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ private static final CertificateValidationContext buildStaticValidationContext(
256256
String... verifySans) {
257257
CertificateValidationContext.Builder builder = CertificateValidationContext.newBuilder();
258258
for (String san : verifySans) {
259-
builder.addMatchSubjectAltNames(StringMatcher.newBuilder().setExact(san));
259+
@SuppressWarnings("deprecation")
260+
CertificateValidationContext.Builder unused =
261+
builder.addMatchSubjectAltNames(StringMatcher.newBuilder().setExact(san));
260262
}
261263
return builder.build();
262264
}

0 commit comments

Comments
 (0)