I will clarify the order in the proposal, but the intended behavior is in order they are specified, so if you are observing otherwise, that might be a bug in the PR. Will check.
On Tuesday, October 10, 2017 at 5:54:31 PM UTC-7, Amit Saha wrote: > > > > On Monday, October 2, 2017 at 11:07:11 PM UTC+11, Mehrdad Afshari wrote: >> >> I've submitted a gRFC for supporting client and server interceptors in >> Python: >> >> https://github.com/grpc/proposal/pull/39 >> >> Implementation: https://github.com/grpc/grpc/pull/12778 >> >> Feedback is appreciated. Per the gRFC process, please keep discussion in >> this thread. >> > > 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. > > > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To post to this group, send email to grpc-io@googlegroups.com. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/67a58262-47ab-46ec-93f4-a9c77310736a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.