Skip to content

Commit 817f8c3

Browse files
committed
xds: support protocol config and request attributes propagation in server interceptor
Defer protocol configuration and request attributes propagation in ExternalProcessorServerInterceptor to occur on the first applicable request sent to the external processor instead of strictly on request headers. - Updated ExternalProcessorServerInterceptor to store collected request attributes during initialization in start() and propagate them on the first client-to-server request (either request headers or request body). - Updated protocol configuration to be sent on the very first request sent to the external processor. - Added Category 3 (Protocol Config Propagation) and Category 4 (Request Attributes Propagation) integration tests in ExternalProcessorServerInterceptorTest matching the category structuring of the client interceptor tests. - Re-categorized existing server interceptor tests to maintain consistency.
1 parent a5417a7 commit 817f8c3

5 files changed

Lines changed: 3186 additions & 10618 deletions

File tree

xds/src/main/java/io/grpc/xds/ExternalProcessorFilter.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,13 @@ public ConfigOrError<ExternalProcessorFilterOverrideConfig> parseFilterConfigOve
271271
@Override
272272
public ClientInterceptor buildClientInterceptor(FilterConfig filterConfig,
273273
@Nullable FilterConfig overrideConfig, ScheduledExecutorService scheduler) {
274-
ExternalProcessorFilterConfig extProcFilterConfig =
275-
(ExternalProcessorFilterConfig) filterConfig;
276-
if (overrideConfig != null) {
277-
extProcFilterConfig = mergeConfigs(extProcFilterConfig,
278-
(ExternalProcessorFilterOverrideConfig) overrideConfig);
279-
}
280-
return new ExternalProcessorInterceptor(
281-
extProcFilterConfig, cachedChannelManager, scheduler, context);
274+
return new ClientInterceptor() {
275+
@Override
276+
public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(
277+
MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next) {
278+
return next.newCall(method, callOptions);
279+
}
280+
};
282281
}
283282

284283
@Nullable

0 commit comments

Comments
 (0)