Could we add the order of execution of the interceptors to the proposal? (Not sure if that makes sense for this document). As per the proposed implementation, there's a comment saying that the interceptors are given control in the order they are listed when calling `intercept_server()`. However, when i tried to verify this behavior via:
diff --git a/demo2/grpc-services/grpc_interceptors/_interceptor.py b/demo2/grpc-services/grpc_interceptors/_interceptor.py
index c63b065..bb33b0b 100644
--- a/demo2/grpc-services/grpc_interceptors/_interceptor.py
+++ b/demo2/grpc-services/grpc_interceptors/_interceptor.py
@@ -228,6 +228,7 @@ class _InterceptingRpcMethodHandler(grpc.RpcMethodHandler):
return self._rpc_method_handler.unary_unary
def adaptation(request, servicer_context):
+ print(self._interceptor)
When I make a `unary_unary` call, this prints the _interceptor object in the reverse order they were specified when registering them with the server.