Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/grpc/middleware/requestinfohandler/requestinfohandler.go11
-rw-r--r--internal/grpc/middleware/requestinfohandler/requestinfohandler_test.go13
2 files changed, 1 insertions, 23 deletions
diff --git a/internal/grpc/middleware/requestinfohandler/requestinfohandler.go b/internal/grpc/middleware/requestinfohandler/requestinfohandler.go
index 0d738c98e..f91fddf5b 100644
--- a/internal/grpc/middleware/requestinfohandler/requestinfohandler.go
+++ b/internal/grpc/middleware/requestinfohandler/requestinfohandler.go
@@ -4,7 +4,6 @@ import (
"context"
"strings"
- grpcmwtags "github.com/grpc-ecosystem/go-grpc-middleware/tags"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging"
grpcprometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/prometheus/client_golang/prometheus"
@@ -197,18 +196,10 @@ func (i *RequestInfo) extractRequestInfo(request any) {
}
func (i *RequestInfo) injectTags(ctx context.Context) context.Context {
- tags := grpcmwtags.NewTags()
-
for key, value := range i.Tags() {
ctx = logging.InjectLogField(ctx, key, value)
- tags.Set(key, value)
+ // tags.Set(key, value)
}
-
- // This maintains backward compatibility for tags in the v1 grpc-go-middleware.
- // This can be removed when the v1 interceptors are removed:
- // https://gitlab.com/gitlab-org/gitaly/-/work_items/5661
- ctx = grpcmwtags.SetInContext(ctx, tags)
-
return ctx
}
diff --git a/internal/grpc/middleware/requestinfohandler/requestinfohandler_test.go b/internal/grpc/middleware/requestinfohandler/requestinfohandler_test.go
index 38e40faeb..5e62707cd 100644
--- a/internal/grpc/middleware/requestinfohandler/requestinfohandler_test.go
+++ b/internal/grpc/middleware/requestinfohandler/requestinfohandler_test.go
@@ -7,7 +7,6 @@ import (
"testing"
"time"
- grpcmwtags "github.com/grpc-ecosystem/go-grpc-middleware/tags"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging"
"github.com/stretchr/testify/require"
gitalylog "gitlab.com/gitlab-org/gitaly/v16/internal/log"
@@ -284,18 +283,6 @@ func TestGRPCTags(t *testing.T) {
"grpc.request.fullMethod": "/gitaly.RepositoryService/OptimizeRepository",
}, gitalylog.ConvertLoggingFields(fields))
- legacyFields := grpcmwtags.Extract(ctx).Values()
-
- require.Equal(t, map[string]any{
- "correlation_id": correlationID,
- "grpc.meta.client_name": clientName,
- "grpc.meta.deadline_type": "none",
- "grpc.meta.method_type": "unary",
- "grpc.meta.method_operation": "maintenance",
- "grpc.meta.method_scope": "repository",
- "grpc.request.fullMethod": "/gitaly.RepositoryService/OptimizeRepository",
- }, legacyFields)
-
return nil, nil
})
require.NoError(t, err)