From e05fed2edca638f82b477ee918f17efaf130c0c4 Mon Sep 17 00:00:00 2001 From: Dhiraj Chhawchharia Date: Thu, 5 Feb 2026 15:56:37 +0530 Subject: [PATCH 1/4] feat:[CI-20729]: Vulnerability fix --- cli/certs/generate_certs.go | 15 ++++--- cli/client/client.go | 5 +-- engine/engine.go | 46 +++++++++------------- go.mod | 18 ++++----- go.sum | 30 +++++--------- internal/filesystem/mock_filesystem.go | 2 +- logger/middleware.go | 6 +-- ti/avro/avro.go | 5 +-- ti/callgraph/parser.go | 7 ++-- ti/callgraph/upload.go | 27 ++++++------- ti/instrumentation/csharp/dotnet_test.go | 2 +- ti/instrumentation/instrumentation_test.go | 2 +- ti/instrumentation/java/bazel_test.go | 2 +- ti/instrumentation/java/gradle_test.go | 2 +- ti/instrumentation/java/helper_test.go | 2 +- ti/instrumentation/java/maven_test.go | 2 +- ti/instrumentation/java/sbt_test.go | 2 +- ti/instrumentation/mocks/runner_mock.go | 2 +- ti/instrumentation/utils.go | 7 ++-- ti/instrumentation/utils_test.go | 2 +- ti/report/parser/junit/junit.go | 4 +- ti/testsplitter/utils.go | 6 +-- 22 files changed, 83 insertions(+), 113 deletions(-) diff --git a/cli/certs/generate_certs.go b/cli/certs/generate_certs.go index 6d198d70..9e5e245f 100644 --- a/cli/certs/generate_certs.go +++ b/cli/certs/generate_certs.go @@ -11,7 +11,6 @@ import ( "github.com/harness/godotenv/v3" "github.com/harness/lite-engine/config" - "github.com/pkg/errors" "github.com/sirupsen/logrus" "gopkg.in/alecthomas/kingpin.v2" ) @@ -26,35 +25,35 @@ type certCommand struct { func generateCert(serverName, relPath string) error { ca, err := GenerateCA() if err != nil { - return errors.Wrap(err, "failed to generate ca certificate") + return fmt.Errorf("failed to generate ca certificate: %w", err) } tlsCert, err := GenerateCert(serverName, ca) if err != nil { - return errors.Wrap(err, "failed to generate certificate") + return fmt.Errorf("failed to generate certificate: %w", err) } err = os.MkdirAll(relPath, os.ModePerm) if err != nil { - return errors.Wrap(err, fmt.Sprintf("failed to create directory at path: %s", relPath)) + return fmt.Errorf("failed to create directory at path: %s: %w", relPath, err) } caCertFilePath := filepath.Join(relPath, "ca-cert.pem") caKeyFilePath := filepath.Join(relPath, "ca-key.pem") if err := os.WriteFile(caCertFilePath, ca.Cert, certPermissions); err != nil { - return errors.Wrap(err, "failed to write CA cert file") + return fmt.Errorf("failed to write CA cert file: %w", err) } if err := os.WriteFile(caKeyFilePath, ca.Key, certPermissions); err != nil { - return errors.Wrap(err, "failed to write CA key file") + return fmt.Errorf("failed to write CA key file: %w", err) } certFilePath := filepath.Join(relPath, "server-cert.pem") keyFilePath := filepath.Join(relPath, "server-key.pem") if err := os.WriteFile(certFilePath, tlsCert.Cert, certPermissions); err != nil { - return errors.Wrap(err, "failed to write server cert file") + return fmt.Errorf("failed to write server cert file: %w", err) } if err := os.WriteFile(keyFilePath, tlsCert.Key, certPermissions); err != nil { - return errors.Wrap(err, "failed to write server key file") + return fmt.Errorf("failed to write server key file: %w", err) } return nil } diff --git a/cli/client/client.go b/cli/client/client.go index ba790c08..ad896bef 100644 --- a/cli/client/client.go +++ b/cli/client/client.go @@ -18,7 +18,6 @@ import ( "github.com/harness/lite-engine/logger" "github.com/harness/godotenv/v3" - "github.com/pkg/errors" "github.com/sirupsen/logrus" "gopkg.in/alecthomas/kingpin.v2" ) @@ -86,7 +85,7 @@ func (c *clientCommand) run(*kingpin.ParseContext) error { if err != nil { logrus.WithError(err). Errorln("failed to create client") - return errors.Wrap(err, "failed to create client") + return fmt.Errorf("failed to create client: %w", err) } } @@ -103,7 +102,7 @@ func checkServerHealth(client Client) error { if healthErr != nil { logrus.WithError(healthErr). Errorln("cannot check the health of the server") - return errors.Wrap(healthErr, "cannot check the health of the server") + return fmt.Errorf("cannot check the health of the server: %w", healthErr) } logrus.WithField("response", response).Info("health check") return nil diff --git a/engine/engine.go b/engine/engine.go index 26c9fdc4..ac97b640 100644 --- a/engine/engine.go +++ b/engine/engine.go @@ -23,7 +23,6 @@ import ( "github.com/harness/lite-engine/engine/spec" "github.com/harness/lite-engine/logstream" "github.com/harness/lite-engine/pipeline" - "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -58,8 +57,7 @@ func NewEnv(opts docker.Opts) (*Engine, error) { func setupHelper(pipelineConfig *spec.PipelineConfig) error { // create global files and folders if err := createFiles(pipelineConfig.Files); err != nil { - return errors.Wrap(err, - fmt.Sprintf("failed to create files/folders for pipeline %v", pipelineConfig.Files)) + return fmt.Errorf("failed to create files/folders for pipeline %v: %w", pipelineConfig.Files, err) } // create volumes for _, vol := range pipelineConfig.Volumes { @@ -75,8 +73,7 @@ func setupHelper(pipelineConfig *spec.PipelineConfig) error { } if err := os.MkdirAll(path, permissions); err != nil { - return errors.Wrap(err, - fmt.Sprintf("failed to create directory for host volume path: %q", path)) + return fmt.Errorf("failed to create directory for host volume path: %q: %w", path, err) } _ = os.Chmod(path, permissions) } @@ -84,7 +81,7 @@ func setupHelper(pipelineConfig *spec.PipelineConfig) error { // create mTLS certs and set environment variable if successful certsWritten, err := createMtlsCerts(pipelineConfig.MtlsConfig) if err != nil { - return errors.Wrap(err, "failed to create mTLS certificates") + return fmt.Errorf("failed to create mTLS certificates: %w", err) } if certsWritten { // This can be used by STO and SSCA plugins to support mTLS @@ -109,34 +106,32 @@ func createMtlsCerts(mtlsConfig spec.MtlsConfig) (bool, error) { // Create the mTLS directory if err := os.MkdirAll(mtlsConfig.ClientCertDirPath, permissions); err != nil { - return false, errors.Wrap(err, "failed to create mTLS directory") + return false, fmt.Errorf("failed to create mTLS directory: %w", err) } // Decode and write certificate certPath := filepath.Join(mtlsConfig.ClientCertDirPath, "client.crt") if err := writeBase64ToFile(certPath, mtlsConfig.ClientCert); err != nil { - return false, errors.Wrap(err, "failed to write mTLS certificate") + return false, fmt.Errorf("failed to write mTLS certificate: %w", err) } // Set 0777 permissions for the certificate if _, err := os.Stat(certPath); err == nil { if err := os.Chmod(certPath, permissions); err != nil { - logrus.Error(errors.Wrap(err, - fmt.Sprintf("Failed to set permissions %o for file on host path: %q", permissions, certPath))) + logrus.Errorf("Failed to set permissions %o for file on host path: %q: %v", permissions, certPath, err) } } // Decode and write key keyPath := filepath.Join(mtlsConfig.ClientCertDirPath, "client.key") if err := writeBase64ToFile(keyPath, mtlsConfig.ClientCertKey); err != nil { - return false, errors.Wrap(err, "failed to write mTLS key") + return false, fmt.Errorf("failed to write mTLS key: %w", err) } // Set 0777 permissions for the key if _, err := os.Stat(keyPath); err == nil { if err := os.Chmod(keyPath, permissions); err != nil { - logrus.Error(errors.Wrap(err, - fmt.Sprintf("Failed to set permissions %o for file on host path: %q", permissions, certPath))) + logrus.Errorf("Failed to set permissions %o for file on host path: %q: %v", permissions, keyPath, err) } } @@ -154,7 +149,7 @@ func loadSanitizePatternsIntoRuntime(sanitizeConfig spec.SanitizeConfig) error { // Decode Base64 content data, err := base64.StdEncoding.DecodeString(sanitizeConfig.SanitizePatternsContent) if err != nil { - return errors.Wrap(err, "failed to decode sanitize patterns from Base64") + return fmt.Errorf("failed to decode sanitize patterns from Base64: %w", err) } // Load patterns directly from decoded string content (in-memory) @@ -170,7 +165,7 @@ func loadSanitizePatternsIntoRuntime(sanitizeConfig spec.SanitizeConfig) error { } if err := logstream.LoadCustomPatternsFromString(content); err != nil { - return errors.Wrap(err, "failed to load sanitize patterns into runtime") + return fmt.Errorf("failed to load sanitize patterns into runtime: %w", err) } logrus.WithField("pattern_count", patternCount).Info("successfully loaded sanitize patterns from delegate into runtime (in-memory)") @@ -181,11 +176,11 @@ func loadSanitizePatternsIntoRuntime(sanitizeConfig spec.SanitizeConfig) error { func writeBase64ToFile(filePath, base64Data string) error { data, err := base64.StdEncoding.DecodeString(base64Data) if err != nil { - return errors.Wrap(err, "failed to decode base64 data") + return fmt.Errorf("failed to decode base64 data: %w", err) } if err := os.WriteFile(filePath, data, permissions); err != nil { - return errors.Wrap(err, fmt.Sprintf("failed to write to file: %s", filePath)) + return fmt.Errorf("failed to write to file: %s: %w", filePath, err) } return nil @@ -354,8 +349,7 @@ func createFiles(paths []*spec.File) error { // make the file writable (if it exists) if _, err := os.Stat(path); err == nil { if err = os.Chmod(path, defaultFilePermissions); err != nil { - logrus.Error(errors.Wrap(err, - fmt.Sprintf("failed to set permissions for file on host path: %q", path))) + logrus.Errorf("failed to set permissions for file on host path: %q: %v", path, err) continue } } @@ -363,8 +357,7 @@ func createFiles(paths []*spec.File) error { if f.IsDir { // create a folder if err := os.MkdirAll(path, fs.FileMode(f.Mode)); err != nil { - return errors.Wrap(err, - fmt.Sprintf("failed to create directory for host path: %q", path)) + return fmt.Errorf("failed to create directory for host path: %q: %w", path, err) } continue } @@ -373,28 +366,25 @@ func createFiles(paths []*spec.File) error { dir := filepath.Dir(path) if _, err := os.Stat(dir); os.IsNotExist(err) { if err := os.MkdirAll(dir, fs.FileMode(permissions)); err != nil { - return errors.Wrap(err, fmt.Sprintf("failed to create directory: for path %q", path)) + return fmt.Errorf("failed to create directory for path %q: %w", path, err) } } // Create (or overwrite) the file file, err := os.Create(path) if err != nil { - return errors.Wrap(err, - fmt.Sprintf("failed to create file for host path: %q", path)) + return fmt.Errorf("failed to create file for host path: %q: %w", path, err) } if _, err = file.WriteString(f.Data); err != nil { _ = file.Close() - return errors.Wrap(err, - fmt.Sprintf("failed to write file for host path: %q", path)) + return fmt.Errorf("failed to write file for host path: %q: %w", path, err) } _ = file.Close() if err = os.Chmod(path, fs.FileMode(f.Mode)); err != nil { - return errors.Wrap(err, - fmt.Sprintf("failed to change permissions for file on host path: %q", path)) + return fmt.Errorf("failed to change permissions for file on host path: %q: %w", path, err) } } return nil diff --git a/go.mod b/go.mod index 23f7da35..6b7dd953 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/harness/lite-engine go 1.24 require ( - github.com/bmatcuk/doublestar v1.3.4 + github.com/bmatcuk/doublestar v1.3.4 // indirect github.com/cenkalti/backoff/v4 v4.2.0 github.com/docker/distribution v2.8.1+incompatible github.com/docker/docker v28.0.2+incompatible @@ -11,33 +11,33 @@ require ( github.com/drone/drone-go v1.7.1 github.com/drone/runner-go v1.12.0 github.com/go-chi/chi/v5 v5.0.8 - github.com/gofrs/uuid v4.4.0+incompatible - github.com/golang/mock v1.6.0 github.com/harness/ti-client v0.0.0-20260106231425-06bf65d965b0 github.com/hashicorp/go-multierror v1.1.1 github.com/kelseyhightower/envconfig v1.4.0 github.com/linkedin/goavro/v2 v2.12.0 github.com/mattn/go-zglob v0.0.4 github.com/mholt/archiver/v3 v3.5.1 - github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.11.1 github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816 golang.org/x/sync v0.16.0 gopkg.in/alecthomas/kingpin.v2 v2.2.6 - gopkg.in/yaml.v2 v2.4.0 ) require ( + github.com/bmatcuk/doublestar/v4 v4.10.0 github.com/cespare/xxhash/v2 v2.3.0 github.com/dgryski/go-lttb v0.0.0-20230207170358-f8fc36cdbff1 + github.com/google/uuid v1.6.0 github.com/harness/godotenv/v2 v2.0.0 github.com/harness/godotenv/v3 v3.0.1 github.com/harness/godotenv/v4 v4.0.2 github.com/shirou/gopsutil/v3 v3.23.5 github.com/wings-software/dlite v1.0.0-rc.13 + go.uber.org/mock v0.6.0 golang.org/x/net v0.43.0 golang.org/x/sys v0.35.0 + gopkg.in/yaml.v3 v3.0.1 ) require ( @@ -60,9 +60,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/klauspost/compress v1.16.7 // indirect github.com/klauspost/pgzip v1.2.5 // indirect @@ -76,6 +74,7 @@ require ( github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/pierrec/lz4/v4 v4.1.2 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect @@ -93,11 +92,10 @@ require ( go.opentelemetry.io/otel/trace v1.38.0 // indirect golang.org/x/crypto v0.41.0 // indirect golang.org/x/exp v0.0.0-20220927162542-c76eaa363f9d // indirect - golang.org/x/mod v0.26.0 // indirect + golang.org/x/mod v0.27.0 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect - golang.org/x/tools v0.35.0 // indirect + golang.org/x/tools v0.36.0 // indirect google.golang.org/genproto v0.0.0-20230320184635-7606e756e683 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.2 // indirect ) diff --git a/go.sum b/go.sum index ad1accca..02f409e8 100644 --- a/go.sum +++ b/go.sum @@ -14,6 +14,8 @@ github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bmatcuk/doublestar v1.3.4 h1:gPypJ5xD31uhX6Tf54sDPUOBXTqKH4c9aPY66CyQrS0= github.com/bmatcuk/doublestar v1.3.4/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE= +github.com/bmatcuk/doublestar/v4 v4.10.0 h1:zU9WiOla1YA122oLM6i4EXvGW62DvKZVxIe6TYWexEs= +github.com/bmatcuk/doublestar/v4 v4.10.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/buildkite/yaml v2.1.0+incompatible h1:xirI+ql5GzfikVNDmt+yeiXpf/v1Gt03qXTtT5WXdr8= github.com/buildkite/yaml v2.1.0+incompatible/go.mod h1:UoU8vbcwu1+vjZq01+KrpSeLBgQQIjL/H7Y6KwikUrI= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -66,14 +68,8 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= -github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -190,7 +186,6 @@ github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofm github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.mongodb.org/mongo-driver v1.17.4 h1:jUorfmVzljjr0FLzYQsGP8cgN/qzzxlY9Vh0C9KFXVw= @@ -215,6 +210,8 @@ go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJr go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4= go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -225,20 +222,17 @@ golang.org/x/exp v0.0.0-20220927162542-c76eaa363f9d h1:3wgmvnqHUJ8SxiNWwea5NCzTw golang.org/x/exp v0.0.0-20220927162542-c76eaa363f9d/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg= -golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= +golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -246,16 +240,12 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= @@ -266,9 +256,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= -golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -286,9 +275,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/filesystem/mock_filesystem.go b/internal/filesystem/mock_filesystem.go index 0f2ba03a..529f419e 100644 --- a/internal/filesystem/mock_filesystem.go +++ b/internal/filesystem/mock_filesystem.go @@ -9,7 +9,7 @@ package filesystem import ( - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" io "io" os "os" reflect "reflect" diff --git a/logger/middleware.go b/logger/middleware.go index bbd6af4c..3f6db2ff 100644 --- a/logger/middleware.go +++ b/logger/middleware.go @@ -7,7 +7,7 @@ package logger import ( "net/http" - "github.com/gofrs/uuid" + "github.com/google/uuid" "github.com/sirupsen/logrus" ) @@ -16,8 +16,8 @@ func Middleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { id := r.Header.Get("X-Request-ID") if id == "" { - newUUID, _ := uuid.NewV4() - id = newUUID.String() + newUUID, _ := uuid.NewRandom() + id = newUUID.String() } ctx := r.Context() log := FromContext(ctx).WithField("request-id", id) diff --git a/ti/avro/avro.go b/ti/avro/avro.go index 144e0896..7c49ba77 100644 --- a/ti/avro/avro.go +++ b/ti/avro/avro.go @@ -8,7 +8,6 @@ import ( "fmt" goavro "github.com/linkedin/goavro/v2" - "github.com/pkg/errors" cg "github.com/harness/lite-engine/ti/avro/schema/callgraph" cg_1_1 "github.com/harness/lite-engine/ti/avro/schema/callgraph_1_1" @@ -52,7 +51,7 @@ func NewCgphSerialzer(typ, version string) (*CgphSerialzer, error) { return nil, fmt.Errorf("type %s is not supported", typ) } if err != nil { - return nil, errors.Wrap(err, "failed to read schema file") + return nil, fmt.Errorf("failed to read schema file: %w", err) } codec, err := goavro.NewCodec(string(schema)) @@ -69,7 +68,7 @@ func NewCgphSerialzer(typ, version string) (*CgphSerialzer, error) { func (c *CgphSerialzer) Serialize(datum interface{}) ([]byte, error) { bin, err := c.codec.BinaryFromNative(nil, datum) if err != nil { - return nil, errors.Wrap(err, "failed to encode the data") + return nil, fmt.Errorf("failed to encode the data: %w", err) } return bin, nil } diff --git a/ti/callgraph/parser.go b/ti/callgraph/parser.go index 4d267f23..9f28b29d 100644 --- a/ti/callgraph/parser.go +++ b/ti/callgraph/parser.go @@ -14,7 +14,6 @@ import ( "strings" "github.com/harness/lite-engine/internal/filesystem" - "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -75,12 +74,12 @@ func (cg *CallGraphParser) readFiles(files []string) ([]string, error) { for _, file := range files { f, err := cg.fs.Open(file) if err != nil { - return []string{}, errors.Wrap(err, fmt.Sprintf("failed to open file %s", file)) + return []string{}, fmt.Errorf("failed to open file %s: %w", file, err) } r := bufio.NewReader(f) cgStr, err := rFile(r) if err != nil { - return []string{}, errors.Wrap(err, fmt.Sprintf("failed to parse file %s", file)) + return []string{}, fmt.Errorf("failed to parse file %s: %w", file, err) } finalData = append(finalData, cgStr...) } @@ -163,7 +162,7 @@ func parseCg(cgStr []string) (*Callgraph, error) { tinp := &Input{} err = json.Unmarshal([]byte(line), tinp) if err != nil { - return nil, errors.Wrap(err, fmt.Sprintf("data unmarshalling to json failed for line [%s]", line)) + return nil, fmt.Errorf("data unmarshalling to json failed for line [%s]: %w", line, err) } inp = append(inp, *tinp) } diff --git a/ti/callgraph/upload.go b/ti/callgraph/upload.go index 97d36d5d..6bc8a63f 100644 --- a/ti/callgraph/upload.go +++ b/ti/callgraph/upload.go @@ -27,7 +27,6 @@ import ( tiClient "github.com/harness/ti-client/client" tiClientTypes "github.com/harness/ti-client/types" "github.com/mattn/go-zglob" - "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -73,24 +72,24 @@ func Upload( } cg, err := parseCallgraphFiles(fmt.Sprintf(dir, stepDataDir), log) if err != nil { - return nil, errors.Wrap(err, "failed to parse callgraph files") + return nil, fmt.Errorf("failed to parse callgraph files: %w", err) } fileChecksums, err := instrumentation.GetGitFileChecksums(ctx, r.WorkingDir, log) if err != nil { - return nil, errors.Wrap(err, "failed to get file hashes") + return nil, fmt.Errorf("failed to get file hashes: %w", err) } uploadPayload, err := CreateUploadPayload(cg, fileChecksums, repo, cfg, sha, tests, log, r.Envs) if err != nil { - return nil, errors.Wrap(err, "failed to create upload payload") + return nil, fmt.Errorf("failed to create upload payload: %w", err) } err = cfg.GetClient().UploadCgV2(ctx, *uploadPayload, stepID, timeMs, cfg.GetSourceBranch(), cfg.GetTargetBranch()) if err != nil { - return nil, errors.Wrap(err, "failed to upload callgraph") + return nil, fmt.Errorf("failed to upload callgraph: %w", err) } } else { encCg, cgIsEmpty, matched, err := encodeCg(fmt.Sprintf(dir, stepDataDir), log, tests, "1_1", rerunFailedTests) if err != nil { - return nil, errors.Wrap(err, "failed to get avro encoded callgraph") + return nil, fmt.Errorf("failed to get avro encoded callgraph: %w", err) } c := cfg.GetClient() @@ -101,7 +100,7 @@ func Upload( // try with version "" encCg, cgIsEmpty, matched, avroErr := encodeCg(fmt.Sprintf(dir, stepDataDir), log, tests, "", rerunFailedTests) if avroErr != nil { - return nil, errors.Wrap(avroErr, "failed to get avro encoded callgraph") + return nil, fmt.Errorf("failed to get avro encoded callgraph: %w", avroErr) } if !cgIsEmpty { if cgErr := c.UploadCg(ctx, stepID, cfg.GetSourceBranch(), cfg.GetTargetBranch(), timeMs, encCg, rerunFailedTests && matched); cgErr != nil { @@ -126,13 +125,13 @@ func parseCallgraphFiles(dataDir string, log *logrus.Logger) (*Callgraph, error) } cgFiles, visFiles, err := getCgFiles(dataDir, "json", "csv", log) if err != nil { - return nil, errors.Wrap(err, "failed to fetch files inside the directory") + return nil, fmt.Errorf("failed to fetch files inside the directory: %w", err) } parser = NewCallGraphParser(log, fs) cg, err := parser.Parse(cgFiles, visFiles) if err != nil { - return nil, errors.Wrap(err, "failed to parse visgraph") + return nil, fmt.Errorf("failed to parse visgraph: %w", err) } return cg, nil } @@ -148,14 +147,14 @@ func encodeCg(dataDir string, log *logrus.Logger, tests []*tiClientTypes.TestCas } cgFiles, visFiles, err := getCgFiles(dataDir, "json", "csv", log) if err != nil { - return nil, cgIsEmpty, false, errors.Wrap(err, "failed to fetch files inside the directory") + return nil, cgIsEmpty, false, fmt.Errorf("failed to fetch files inside the directory: %w", err) } parser = NewCallGraphParser(log, fs) log.Infoln(fmt.Sprintf("Found callgraph files: %v", cgFiles)) cg, err := parser.Parse(cgFiles, visFiles) if err != nil { - return nil, cgIsEmpty, false, errors.Wrap(err, "failed to parse callgraph") + return nil, cgIsEmpty, false, fmt.Errorf("failed to parse callgraph: %w", err) } log.Infof("Callgraph parsing completed. Total nodes: %d", len(cg.Nodes)) @@ -215,11 +214,11 @@ func encodeCg(dataDir string, log *logrus.Logger, tests []*tiClientTypes.TestCas cgMap := cg.ToStringMap() cgSer, err := avro.NewCgphSerialzer(cgSchemaType, version) if err != nil { - return nil, cgIsEmpty, false, errors.Wrap(err, "failed to create serializer") + return nil, cgIsEmpty, false, fmt.Errorf("failed to create serializer: %w", err) } encCg, err := cgSer.Serialize(cgMap) if err != nil { - return nil, cgIsEmpty, false, errors.Wrap(err, "failed to encode callgraph") + return nil, cgIsEmpty, false, fmt.Errorf("failed to encode callgraph: %w", err) } return encCg, cgIsEmpty, allMatched, nil } @@ -317,7 +316,7 @@ func fetchFailedTests(filePath string) ([]string, error) { }) if err != nil { - return nil, errors.Wrap(err, fmt.Sprintf("failed to read file %s", filePath)) + return nil, fmt.Errorf("failed to read file %s: %w", filePath, err) } return lines, nil diff --git a/ti/instrumentation/csharp/dotnet_test.go b/ti/instrumentation/csharp/dotnet_test.go index 3672f485..81ff9482 100644 --- a/ti/instrumentation/csharp/dotnet_test.go +++ b/ti/instrumentation/csharp/dotnet_test.go @@ -9,7 +9,7 @@ import ( "os" "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "github.com/harness/lite-engine/internal/filesystem" "github.com/harness/lite-engine/ti/instrumentation/common" ti "github.com/harness/ti-client/types" diff --git a/ti/instrumentation/instrumentation_test.go b/ti/instrumentation/instrumentation_test.go index c5e47b8c..7dd6642e 100644 --- a/ti/instrumentation/instrumentation_test.go +++ b/ti/instrumentation/instrumentation_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "github.com/harness/lite-engine/api" tiCfg "github.com/harness/lite-engine/ti/config" mocks "github.com/harness/lite-engine/ti/instrumentation/mocks" diff --git a/ti/instrumentation/java/bazel_test.go b/ti/instrumentation/java/bazel_test.go index 71fd290c..9867f2f3 100644 --- a/ti/instrumentation/java/bazel_test.go +++ b/ti/instrumentation/java/bazel_test.go @@ -11,7 +11,7 @@ import ( "os/exec" "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "github.com/harness/lite-engine/internal/filesystem" "github.com/harness/lite-engine/ti/instrumentation/common" ti "github.com/harness/ti-client/types" diff --git a/ti/instrumentation/java/gradle_test.go b/ti/instrumentation/java/gradle_test.go index d95b4e0f..00ff0d01 100644 --- a/ti/instrumentation/java/gradle_test.go +++ b/ti/instrumentation/java/gradle_test.go @@ -10,7 +10,7 @@ import ( "path/filepath" "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "github.com/harness/lite-engine/internal/filesystem" "github.com/harness/lite-engine/ti/instrumentation/common" ti "github.com/harness/ti-client/types" diff --git a/ti/instrumentation/java/helper_test.go b/ti/instrumentation/java/helper_test.go index 262250e6..0d15e958 100644 --- a/ti/instrumentation/java/helper_test.go +++ b/ti/instrumentation/java/helper_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "github.com/harness/lite-engine/internal/filesystem" "github.com/harness/lite-engine/ti/instrumentation/common" "github.com/sirupsen/logrus" diff --git a/ti/instrumentation/java/maven_test.go b/ti/instrumentation/java/maven_test.go index f831f78d..0f844c90 100644 --- a/ti/instrumentation/java/maven_test.go +++ b/ti/instrumentation/java/maven_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "github.com/harness/lite-engine/internal/filesystem" "github.com/harness/lite-engine/ti/instrumentation/common" ti "github.com/harness/ti-client/types" diff --git a/ti/instrumentation/java/sbt_test.go b/ti/instrumentation/java/sbt_test.go index d7b101ae..bf241a21 100644 --- a/ti/instrumentation/java/sbt_test.go +++ b/ti/instrumentation/java/sbt_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "github.com/harness/lite-engine/internal/filesystem" "github.com/harness/lite-engine/ti/instrumentation/common" ti "github.com/harness/ti-client/types" diff --git a/ti/instrumentation/mocks/runner_mock.go b/ti/instrumentation/mocks/runner_mock.go index aad8226e..4b993bce 100644 --- a/ti/instrumentation/mocks/runner_mock.go +++ b/ti/instrumentation/mocks/runner_mock.go @@ -8,7 +8,7 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" common "github.com/harness/lite-engine/ti/instrumentation/common" types "github.com/harness/ti-client/types" ) diff --git a/ti/instrumentation/utils.go b/ti/instrumentation/utils.go index 14b69f54..30df3029 100644 --- a/ti/instrumentation/utils.go +++ b/ti/instrumentation/utils.go @@ -22,9 +22,8 @@ import ( "github.com/cespare/xxhash/v2" "github.com/mattn/go-zglob" - "github.com/pkg/errors" "github.com/sirupsen/logrus" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "github.com/harness/lite-engine/internal/filesystem" tiCfg "github.com/harness/lite-engine/ti/config" @@ -814,11 +813,11 @@ func getTiConfig(workspace string, fs filesystem.FileSystem) (ti.TiConfig, error return err }) if err != nil { - return res, errors.Wrap(err, "could not read ticonfig file") + return res, fmt.Errorf("could not read ticonfig file: %w", err) } err = yaml.Unmarshal(data, &res) if err != nil { - return res, errors.Wrap(err, "could not unmarshal ticonfig file") + return res, fmt.Errorf("could not unmarshal ticonfig file: %w", err) } return res, nil } diff --git a/ti/instrumentation/utils_test.go b/ti/instrumentation/utils_test.go index eecfa1ff..ba0a5aea 100644 --- a/ti/instrumentation/utils_test.go +++ b/ti/instrumentation/utils_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" tiCfg "github.com/harness/lite-engine/ti/config" ti "github.com/harness/ti-client/types" "github.com/sirupsen/logrus" diff --git a/ti/report/parser/junit/junit.go b/ti/report/parser/junit/junit.go index 01bcc1ca..db067930 100644 --- a/ti/report/parser/junit/junit.go +++ b/ti/report/parser/junit/junit.go @@ -5,6 +5,7 @@ package junit import ( + "errors" "fmt" "os" "path/filepath" @@ -12,7 +13,6 @@ import ( "github.com/harness/lite-engine/ti/report/parser/junit/gojunit" ti "github.com/harness/ti-client/types" "github.com/mattn/go-zglob" - "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -240,7 +240,7 @@ func expandTilde(path string) (string, error) { dir, err := os.UserHomeDir() if err != nil { - return "", errors.Wrap(err, "failed to fetch home directory") + return "", fmt.Errorf("failed to fetch home directory: %w", err) } return filepath.Join(dir, path[1:]), nil diff --git a/ti/testsplitter/utils.go b/ti/testsplitter/utils.go index 66fba758..6095dc74 100644 --- a/ti/testsplitter/utils.go +++ b/ti/testsplitter/utils.go @@ -4,7 +4,7 @@ import ( "encoding/json" "sort" - "github.com/bmatcuk/doublestar" + "github.com/bmatcuk/doublestar/v4" ) // ProcessFiles removes non-existent files and adds new files to the file-times map. @@ -42,7 +42,7 @@ func GetTestData(patterns, excludePatterns []string) (map[string]bool, error) { // We are not using filepath.Glob, // because it doesn't support '**' (to match all files in all nested directories) for _, pattern := range patterns { - currentFiles, err := doublestar.Glob(pattern) + currentFiles, err := doublestar.FilepathGlob(pattern) if err != nil { return currentFileSet, err } @@ -54,7 +54,7 @@ func GetTestData(patterns, excludePatterns []string) (map[string]bool, error) { // Exclude the specified files for _, excludePattern := range excludePatterns { - excludedFiles, err := doublestar.Glob(excludePattern) + excludedFiles, err := doublestar.FilepathGlob(excludePattern) if err != nil { return currentFileSet, err } From e832163b32d3b863099ccfb071228f59cbb9032d Mon Sep 17 00:00:00 2001 From: Dhiraj Chhawchharia Date: Fri, 6 Feb 2026 01:07:37 +0530 Subject: [PATCH 2/4] feat:[CI-20729]: Vulnerabilities fixed --- cli/certs/generate_certs.go | 2 +- cli/cli.go | 2 +- cli/client/client.go | 2 +- cli/server/server.go | 2 +- go.mod | 22 +++++++-------- go.sum | 56 ++++++++++++++++--------------------- 6 files changed, 39 insertions(+), 47 deletions(-) diff --git a/cli/certs/generate_certs.go b/cli/certs/generate_certs.go index 9e5e245f..766f8764 100644 --- a/cli/certs/generate_certs.go +++ b/cli/certs/generate_certs.go @@ -12,7 +12,7 @@ import ( "github.com/harness/godotenv/v3" "github.com/harness/lite-engine/config" "github.com/sirupsen/logrus" - "gopkg.in/alecthomas/kingpin.v2" + "github.com/alecthomas/kingpin/v2" ) const certPermissions = os.FileMode(0600) diff --git a/cli/cli.go b/cli/cli.go index 3400ba05..6953fe99 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -12,7 +12,7 @@ import ( "github.com/harness/lite-engine/cli/server" "github.com/harness/lite-engine/version" - "gopkg.in/alecthomas/kingpin.v2" + "github.com/alecthomas/kingpin/v2" ) // Command parses the command line arguments and then executes a diff --git a/cli/client/client.go b/cli/client/client.go index ad896bef..40220796 100644 --- a/cli/client/client.go +++ b/cli/client/client.go @@ -19,7 +19,7 @@ import ( "github.com/harness/godotenv/v3" "github.com/sirupsen/logrus" - "gopkg.in/alecthomas/kingpin.v2" + "github.com/alecthomas/kingpin/v2" ) type Client interface { diff --git a/cli/server/server.go b/cli/server/server.go index edfe9030..6da4b111 100644 --- a/cli/server/server.go +++ b/cli/server/server.go @@ -22,7 +22,7 @@ import ( "github.com/harness/godotenv/v3" "github.com/sirupsen/logrus" - "gopkg.in/alecthomas/kingpin.v2" + "github.com/alecthomas/kingpin/v2" ) type serverCommand struct { diff --git a/go.mod b/go.mod index 6b7dd953..78978fdd 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,16 @@ module github.com/harness/lite-engine -go 1.24 +go 1.24.0 require ( + github.com/alecthomas/kingpin/v2 v2.4.0 github.com/bmatcuk/doublestar v1.3.4 // indirect - github.com/cenkalti/backoff/v4 v4.2.0 + github.com/cenkalti/backoff/v4 v4.3.0 github.com/docker/distribution v2.8.1+incompatible github.com/docker/docker v28.0.2+incompatible github.com/docker/go-connections v0.4.0 github.com/drone/drone-go v1.7.1 - github.com/drone/runner-go v1.12.0 + github.com/drone/runner-go v1.12.1-0.20260205183937-320be7515cd8 github.com/go-chi/chi/v5 v5.0.8 github.com/harness/ti-client v0.0.0-20260106231425-06bf65d965b0 github.com/hashicorp/go-multierror v1.1.1 @@ -17,11 +18,10 @@ require ( github.com/linkedin/goavro/v2 v2.12.0 github.com/mattn/go-zglob v0.0.4 github.com/mholt/archiver/v3 v3.5.1 - github.com/sirupsen/logrus v1.9.3 + github.com/sirupsen/logrus v1.9.4 github.com/stretchr/testify v1.11.1 github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816 - golang.org/x/sync v0.16.0 - gopkg.in/alecthomas/kingpin.v2 v2.2.6 + golang.org/x/sync v0.18.0 ) require ( @@ -35,15 +35,14 @@ require ( github.com/shirou/gopsutil/v3 v3.23.5 github.com/wings-software/dlite v1.0.0-rc.13 go.uber.org/mock v0.6.0 - golang.org/x/net v0.43.0 - golang.org/x/sys v0.35.0 + golang.org/x/net v0.47.0 + golang.org/x/sys v0.40.0 gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/99designs/httpsignatures-go v0.0.0-20170731043157-88528bf4ca7e // indirect github.com/Microsoft/go-winio v0.6.0 // indirect - github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/andybalholm/brotli v1.0.1 // indirect github.com/buildkite/yaml v2.1.0+incompatible // indirect @@ -80,7 +79,8 @@ require ( github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect - github.com/ulikunitz/xz v0.5.9 // indirect + github.com/ulikunitz/xz v0.5.15 // indirect + github.com/xhit/go-str2duration/v2 v2.1.0 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect go.mongodb.org/mongo-driver v1.17.4 // indirect @@ -90,7 +90,7 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 // indirect go.opentelemetry.io/otel/metric v1.38.0 // indirect go.opentelemetry.io/otel/trace v1.38.0 // indirect - golang.org/x/crypto v0.41.0 // indirect + golang.org/x/crypto v0.45.0 // indirect golang.org/x/exp v0.0.0-20220927162542-c76eaa363f9d // indirect golang.org/x/mod v0.27.0 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect diff --git a/go.sum b/go.sum index 02f409e8..a3d1d0aa 100644 --- a/go.sum +++ b/go.sum @@ -1,17 +1,15 @@ -github.com/99designs/basicauth-go v0.0.0-20160802081356-2a93ba0f464d/go.mod h1:3cARGAK9CfW3HoxCy1a0G4TKrdiKke8ftOMEOHyySYs= github.com/99designs/httpsignatures-go v0.0.0-20170731043157-88528bf4ca7e h1:rl2Aq4ZODqTDkeSqQBy+fzpZPamacO1Srp8zq7jf2Sc= github.com/99designs/httpsignatures-go v0.0.0-20170731043157-88528bf4ca7e/go.mod h1:Xa6lInWHNQnuWoF0YPSsx+INFA9qk7/7pTjwb3PInkY= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY= +github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/andybalholm/brotli v1.0.1 h1:KqhlKozYbRtJvsPrrEeXcO+N2l6NYT5A2QAFmSULpEc= github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bmatcuk/doublestar v1.3.4 h1:gPypJ5xD31uhX6Tf54sDPUOBXTqKH4c9aPY66CyQrS0= github.com/bmatcuk/doublestar v1.3.4/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE= github.com/bmatcuk/doublestar/v4 v4.10.0 h1:zU9WiOla1YA122oLM6i4EXvGW62DvKZVxIe6TYWexEs= @@ -20,15 +18,14 @@ github.com/buildkite/yaml v2.1.0+incompatible h1:xirI+ql5GzfikVNDmt+yeiXpf/v1Gt0 github.com/buildkite/yaml v2.1.0+incompatible/go.mod h1:UoU8vbcwu1+vjZq01+KrpSeLBgQQIjL/H7Y6KwikUrI= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -44,16 +41,14 @@ github.com/docker/docker v28.0.2+incompatible h1:9BILleFwug5FSSqWBgVevgL3ewDJfWW github.com/docker/docker v28.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/drone/drone-go v1.7.1 h1:ZX+3Rs8YHUSUQ5mkuMLmm1zr1ttiiE2YGNxF3AnyDKw= github.com/drone/drone-go v1.7.1/go.mod h1:fxCf9jAnXDZV1yDr0ckTuWd1intvcQwfJmTRpTZ1mXg= -github.com/drone/envsubst v1.0.2/go.mod h1:bkZbnc/2vh1M12Ecn7EYScpI4YGYU0etwLJICOWi8Z0= github.com/drone/envsubst v1.0.3 h1:PCIBwNDYjs50AsLZPYdfhSATKaRg/FJmDc2D6+C2x8g= github.com/drone/envsubst v1.0.3/go.mod h1:N2jZmlMufstn1KEqvbHjw40h1KyTmnVzHcSc9bFiJ2g= -github.com/drone/runner-go v1.12.0 h1:zUjDj9ylsJ4n4Mvy4znddq/Z4EBzcUXzTltpzokKtgs= -github.com/drone/runner-go v1.12.0/go.mod h1:vu4pPPYDoeN6vdYQAY01GGGsAIW4aLganJNaa8Fx8zE= +github.com/drone/runner-go v1.12.1-0.20260205183937-320be7515cd8 h1:zn1oSGnPfdSUgnWhCMC5R2fkQaGW5TIW2IowOOyBPMs= +github.com/drone/runner-go v1.12.1-0.20260205183937-320be7515cd8/go.mod h1:lQequ7MIt/ur8eI+iTaxOPyduq99qVFo9E9yhOMYR0s= github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 h1:iFaUwBSo5Svw6L7HYpRu/0lE3e0BaElwnNO1qkNQxBY= github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= @@ -75,7 +70,6 @@ github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -96,7 +90,6 @@ github.com/harness/ti-client v0.0.0-20260106231425-06bf65d965b0/go.mod h1:dGKnH3 github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= @@ -156,15 +149,14 @@ github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= +github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -178,10 +170,13 @@ github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7Am github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I= github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY= +github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/wings-software/dlite v1.0.0-rc.13 h1:p5cWaspKrSS9x9qheqf/yN9V39jnlMp82JR1p1tO0Ts= github.com/wings-software/dlite v1.0.0-rc.13/go.mod h1:zZd6iaMk8Av1QSABGuDWdxBFO82MxE0r6PRoDsLDvCE= +github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= +github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -213,11 +208,10 @@ go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzK go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= -golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= +golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= +golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/exp v0.0.0-20220927162542-c76eaa363f9d h1:3wgmvnqHUJ8SxiNWwea5NCzTwAVfhTtuV+0ClVFlClc= golang.org/x/exp v0.0.0-20220927162542-c76eaa363f9d/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -228,28 +222,27 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE= -golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg= +golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= +golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= +golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= -golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= -golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= +golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= +golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -268,15 +261,14 @@ google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4= google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= -gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 4be6632397fb67c901668944a405af7d126d3bf0 Mon Sep 17 00:00:00 2001 From: Dhiraj Chhawchharia Date: Mon, 9 Feb 2026 18:50:47 +0530 Subject: [PATCH 3/4] feat:[CI-20729]: Updated runner-go --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 78978fdd..4ea45a7b 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/docker/docker v28.0.2+incompatible github.com/docker/go-connections v0.4.0 github.com/drone/drone-go v1.7.1 - github.com/drone/runner-go v1.12.1-0.20260205183937-320be7515cd8 + github.com/drone/runner-go v1.13.0 github.com/go-chi/chi/v5 v5.0.8 github.com/harness/ti-client v0.0.0-20260106231425-06bf65d965b0 github.com/hashicorp/go-multierror v1.1.1 diff --git a/go.sum b/go.sum index a3d1d0aa..dcc67a64 100644 --- a/go.sum +++ b/go.sum @@ -47,8 +47,8 @@ github.com/drone/drone-go v1.7.1 h1:ZX+3Rs8YHUSUQ5mkuMLmm1zr1ttiiE2YGNxF3AnyDKw= github.com/drone/drone-go v1.7.1/go.mod h1:fxCf9jAnXDZV1yDr0ckTuWd1intvcQwfJmTRpTZ1mXg= github.com/drone/envsubst v1.0.3 h1:PCIBwNDYjs50AsLZPYdfhSATKaRg/FJmDc2D6+C2x8g= github.com/drone/envsubst v1.0.3/go.mod h1:N2jZmlMufstn1KEqvbHjw40h1KyTmnVzHcSc9bFiJ2g= -github.com/drone/runner-go v1.12.1-0.20260205183937-320be7515cd8 h1:zn1oSGnPfdSUgnWhCMC5R2fkQaGW5TIW2IowOOyBPMs= -github.com/drone/runner-go v1.12.1-0.20260205183937-320be7515cd8/go.mod h1:lQequ7MIt/ur8eI+iTaxOPyduq99qVFo9E9yhOMYR0s= +github.com/drone/runner-go v1.13.0 h1:hG/4WAptS/P8NgVjsq87IYV8D3FTxMHf2UnXdF+Kyfo= +github.com/drone/runner-go v1.13.0/go.mod h1:lQequ7MIt/ur8eI+iTaxOPyduq99qVFo9E9yhOMYR0s= github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 h1:iFaUwBSo5Svw6L7HYpRu/0lE3e0BaElwnNO1qkNQxBY= github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= From bf3cd7e3b4c6720bcdf46e11c145d7518f757021 Mon Sep 17 00:00:00 2001 From: Dhiraj Chhawchharia Date: Mon, 9 Feb 2026 20:10:43 +0530 Subject: [PATCH 4/4] feat:[CI-20729]: Lint fixed --- cli/certs/generate_certs.go | 2 +- cli/client/client.go | 2 +- cli/server/server.go | 2 +- logger/middleware.go | 4 ++-- ti/instrumentation/csharp/dotnet_test.go | 2 +- ti/instrumentation/instrumentation_test.go | 2 +- ti/instrumentation/java/bazel_test.go | 2 +- ti/instrumentation/java/gradle_test.go | 2 +- ti/instrumentation/java/helper_test.go | 2 +- ti/instrumentation/java/maven_test.go | 2 +- ti/instrumentation/java/sbt_test.go | 2 +- ti/instrumentation/mocks/runner_mock.go | 2 +- ti/instrumentation/utils_test.go | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cli/certs/generate_certs.go b/cli/certs/generate_certs.go index 766f8764..5cde55b0 100644 --- a/cli/certs/generate_certs.go +++ b/cli/certs/generate_certs.go @@ -9,10 +9,10 @@ import ( "os" "path/filepath" + "github.com/alecthomas/kingpin/v2" "github.com/harness/godotenv/v3" "github.com/harness/lite-engine/config" "github.com/sirupsen/logrus" - "github.com/alecthomas/kingpin/v2" ) const certPermissions = os.FileMode(0600) diff --git a/cli/client/client.go b/cli/client/client.go index 40220796..9f6ae989 100644 --- a/cli/client/client.go +++ b/cli/client/client.go @@ -17,9 +17,9 @@ import ( "github.com/harness/lite-engine/engine/spec" "github.com/harness/lite-engine/logger" + "github.com/alecthomas/kingpin/v2" "github.com/harness/godotenv/v3" "github.com/sirupsen/logrus" - "github.com/alecthomas/kingpin/v2" ) type Client interface { diff --git a/cli/server/server.go b/cli/server/server.go index 6da4b111..f2ec0db7 100644 --- a/cli/server/server.go +++ b/cli/server/server.go @@ -20,9 +20,9 @@ import ( "github.com/harness/lite-engine/server" "github.com/harness/lite-engine/setup" + "github.com/alecthomas/kingpin/v2" "github.com/harness/godotenv/v3" "github.com/sirupsen/logrus" - "github.com/alecthomas/kingpin/v2" ) type serverCommand struct { diff --git a/logger/middleware.go b/logger/middleware.go index 3f6db2ff..50892001 100644 --- a/logger/middleware.go +++ b/logger/middleware.go @@ -16,8 +16,8 @@ func Middleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { id := r.Header.Get("X-Request-ID") if id == "" { - newUUID, _ := uuid.NewRandom() - id = newUUID.String() + newUUID, _ := uuid.NewRandom() + id = newUUID.String() } ctx := r.Context() log := FromContext(ctx).WithField("request-id", id) diff --git a/ti/instrumentation/csharp/dotnet_test.go b/ti/instrumentation/csharp/dotnet_test.go index 81ff9482..24a5eccc 100644 --- a/ti/instrumentation/csharp/dotnet_test.go +++ b/ti/instrumentation/csharp/dotnet_test.go @@ -9,12 +9,12 @@ import ( "os" "testing" - "go.uber.org/mock/gomock" "github.com/harness/lite-engine/internal/filesystem" "github.com/harness/lite-engine/ti/instrumentation/common" ti "github.com/harness/ti-client/types" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" ) func TestMain(t *testing.M) { diff --git a/ti/instrumentation/instrumentation_test.go b/ti/instrumentation/instrumentation_test.go index 7dd6642e..921fc12d 100644 --- a/ti/instrumentation/instrumentation_test.go +++ b/ti/instrumentation/instrumentation_test.go @@ -6,13 +6,13 @@ import ( "strconv" "testing" - "go.uber.org/mock/gomock" "github.com/harness/lite-engine/api" tiCfg "github.com/harness/lite-engine/ti/config" mocks "github.com/harness/lite-engine/ti/instrumentation/mocks" ti "github.com/harness/ti-client/types" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" ) func TestComputeSelected(t *testing.T) { //nolint:funlen diff --git a/ti/instrumentation/java/bazel_test.go b/ti/instrumentation/java/bazel_test.go index 9867f2f3..b1cf9632 100644 --- a/ti/instrumentation/java/bazel_test.go +++ b/ti/instrumentation/java/bazel_test.go @@ -11,12 +11,12 @@ import ( "os/exec" "testing" - "go.uber.org/mock/gomock" "github.com/harness/lite-engine/internal/filesystem" "github.com/harness/lite-engine/ti/instrumentation/common" ti "github.com/harness/ti-client/types" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" ) const bazelRuleStringsBazelAutoDetectTests = "//module1:pkg1.cls1\n//module1:pkg1.cls2\n//module1:pkg2\n//module1:pkg2/cls2\n" diff --git a/ti/instrumentation/java/gradle_test.go b/ti/instrumentation/java/gradle_test.go index 00ff0d01..ca5732c9 100644 --- a/ti/instrumentation/java/gradle_test.go +++ b/ti/instrumentation/java/gradle_test.go @@ -10,12 +10,12 @@ import ( "path/filepath" "testing" - "go.uber.org/mock/gomock" "github.com/harness/lite-engine/internal/filesystem" "github.com/harness/lite-engine/ti/instrumentation/common" ti "github.com/harness/ti-client/types" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" ) func TestGetGradleCmd(t *testing.T) { //nolint:funlen diff --git a/ti/instrumentation/java/helper_test.go b/ti/instrumentation/java/helper_test.go index 0d15e958..4bce7be7 100644 --- a/ti/instrumentation/java/helper_test.go +++ b/ti/instrumentation/java/helper_test.go @@ -8,11 +8,11 @@ import ( "context" "testing" - "go.uber.org/mock/gomock" "github.com/harness/lite-engine/internal/filesystem" "github.com/harness/lite-engine/ti/instrumentation/common" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" ) const ( diff --git a/ti/instrumentation/java/maven_test.go b/ti/instrumentation/java/maven_test.go index 0f844c90..4960c54e 100644 --- a/ti/instrumentation/java/maven_test.go +++ b/ti/instrumentation/java/maven_test.go @@ -12,11 +12,11 @@ import ( "github.com/stretchr/testify/assert" - "go.uber.org/mock/gomock" "github.com/harness/lite-engine/internal/filesystem" "github.com/harness/lite-engine/ti/instrumentation/common" ti "github.com/harness/ti-client/types" "github.com/sirupsen/logrus" + "go.uber.org/mock/gomock" ) func TestMaven_GetCmd(t *testing.T) { //nolint:funlen diff --git a/ti/instrumentation/java/sbt_test.go b/ti/instrumentation/java/sbt_test.go index bf241a21..496fa0d8 100644 --- a/ti/instrumentation/java/sbt_test.go +++ b/ti/instrumentation/java/sbt_test.go @@ -11,11 +11,11 @@ import ( "github.com/stretchr/testify/assert" - "go.uber.org/mock/gomock" "github.com/harness/lite-engine/internal/filesystem" "github.com/harness/lite-engine/ti/instrumentation/common" ti "github.com/harness/ti-client/types" "github.com/sirupsen/logrus" + "go.uber.org/mock/gomock" ) func TestSBT_GetCmd(t *testing.T) { //nolint:funlen diff --git a/ti/instrumentation/mocks/runner_mock.go b/ti/instrumentation/mocks/runner_mock.go index 4b993bce..a1a5c252 100644 --- a/ti/instrumentation/mocks/runner_mock.go +++ b/ti/instrumentation/mocks/runner_mock.go @@ -8,9 +8,9 @@ import ( context "context" reflect "reflect" - gomock "go.uber.org/mock/gomock" common "github.com/harness/lite-engine/ti/instrumentation/common" types "github.com/harness/ti-client/types" + gomock "go.uber.org/mock/gomock" ) // MockTestRunner is a mock of TestRunner interface. diff --git a/ti/instrumentation/utils_test.go b/ti/instrumentation/utils_test.go index ba0a5aea..9bc49020 100644 --- a/ti/instrumentation/utils_test.go +++ b/ti/instrumentation/utils_test.go @@ -5,11 +5,11 @@ import ( "reflect" "testing" - "go.uber.org/mock/gomock" tiCfg "github.com/harness/lite-engine/ti/config" ti "github.com/harness/ti-client/types" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" ) func Test_GetSplitTests(t *testing.T) {