Skip to content

Commit

Permalink
Remove duplicate recovery interceptor
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Parraga <[email protected]>
  • Loading branch information
Sovietaced committed Oct 19, 2024
1 parent bdaf79f commit 66c8c8e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions flyteadmin/pkg/server/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/gorilla/handlers"
grpcmiddleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpcauth "github.com/grpc-ecosystem/go-grpc-middleware/auth"
grpcrecovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
grpcprometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/pkg/errors"
Expand Down Expand Up @@ -111,7 +110,6 @@ func newGRPCServer(ctx context.Context, pluginRegistry *plugins.Registry, cfg *c
chainedUnaryInterceptors = grpcmiddleware.ChainUnaryServer(
// recovery interceptor should always be first in order to handle any panics in the middleware or server
recoveryInterceptor.UnaryServerInterceptor(),
grpcrecovery.UnaryServerInterceptor(),
grpcprometheus.UnaryServerInterceptor,
otelUnaryServerInterceptor,
auth.GetAuthenticationCustomMetadataInterceptor(authCtx),
Expand All @@ -136,7 +134,6 @@ func newGRPCServer(ctx context.Context, pluginRegistry *plugins.Registry, cfg *c
)

serverOpts := []grpc.ServerOption{
// recovery interceptor should always be first in order to handle any panics in the middleware or server
grpc.StreamInterceptor(chainedStreamInterceptors),
grpc.UnaryInterceptor(chainedUnaryInterceptors),
}
Expand Down

0 comments on commit 66c8c8e

Please sign in to comment.