From 2eeb6b1dc168ce30b04f59eabb39d5735a2d7230 Mon Sep 17 00:00:00 2001 From: Flavien Darche Date: Tue, 5 Nov 2024 21:56:10 +0100 Subject: [PATCH] fix ci --- contrib/envoyproxy/envoy/envoy.go | 15 ++++++++++++++- internal/apps/go.mod | 2 +- internal/apps/go.sum | 4 ++-- internal/exectracetest/go.mod | 2 +- internal/exectracetest/go.sum | 4 ++-- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/contrib/envoyproxy/envoy/envoy.go b/contrib/envoyproxy/envoy/envoy.go index a9acf4fdc2..413d475726 100644 --- a/contrib/envoyproxy/envoy/envoy.go +++ b/contrib/envoyproxy/envoy/envoy.go @@ -8,7 +8,9 @@ package envoy import ( "context" "errors" + "gopkg.in/DataDog/dd-trace-go.v1/internal/telemetry" "io" + "math" "net/http" "net/url" "strconv" @@ -37,6 +39,13 @@ import ( "gopkg.in/DataDog/dd-trace-go.v1/internal/log" ) +const componentName = "envoy/service/ext_proc/v3" + +func init() { + telemetry.LoadIntegration(componentName) + tracer.MarkIntegrationImported("github.com/envoyproxy/go-control-plane/envoy/service/ext_proc/v3") +} + type CurrentRequest struct { op *httpsec.HandlerOperation blockAction *atomic.Pointer[actions.BlockHTTP] @@ -379,12 +388,16 @@ func doBlockRequest(currentRequest *CurrentRequest, blockAction *actions.BlockHT httpsec2.SetResponseHeadersTags(currentRequest.span, headerToSet) currentRequest.statusCode = blockAction.StatusCode + var int32StatusCode int32 = 0 + if currentRequest.statusCode > 0 && currentRequest.statusCode <= math.MaxInt32 { + int32StatusCode = int32(currentRequest.statusCode) + } return &extproc.ProcessingResponse{ Response: &extproc.ProcessingResponse_ImmediateResponse{ ImmediateResponse: &extproc.ImmediateResponse{ Status: &v32.HttpStatus{ - Code: v32.StatusCode(int32(currentRequest.statusCode)), + Code: v32.StatusCode(int32StatusCode), }, Headers: &extproc.HeaderMutation{ SetHeaders: headersMutation, diff --git a/internal/apps/go.mod b/internal/apps/go.mod index 8b2398cb8b..be677a5009 100644 --- a/internal/apps/go.mod +++ b/internal/apps/go.mod @@ -55,7 +55,7 @@ require ( golang.org/x/text v0.17.0 // indirect golang.org/x/tools v0.24.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect - google.golang.org/grpc v1.64.1 // indirect + google.golang.org/grpc v1.65.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/internal/apps/go.sum b/internal/apps/go.sum index 133c81441d..23aee43d13 100644 --- a/internal/apps/go.sum +++ b/internal/apps/go.sum @@ -280,8 +280,8 @@ google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAs google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q= google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/internal/exectracetest/go.mod b/internal/exectracetest/go.mod index 18bc552f29..9031c4497f 100644 --- a/internal/exectracetest/go.mod +++ b/internal/exectracetest/go.mod @@ -72,7 +72,7 @@ require ( golang.org/x/tools v0.24.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect - google.golang.org/grpc v1.64.1 // indirect + google.golang.org/grpc v1.65.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/internal/exectracetest/go.sum b/internal/exectracetest/go.sum index 5e9a403a39..bcd7a0e887 100644 --- a/internal/exectracetest/go.sum +++ b/internal/exectracetest/go.sum @@ -288,8 +288,8 @@ google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAs google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q= google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=