From 742ca739e24853b21eea1f25b4721a93ab2d7f74 Mon Sep 17 00:00:00 2001 From: ShobhitSingh11 <139750384+ShobhitSingh11@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:50:22 +0530 Subject: [PATCH] fix: [CI-14200]: Trimming new line suffix from Log Line to avoid extra new line space (#515) --- command/config/config.go | 2 +- command/harness/helper.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/command/config/config.go b/command/config/config.go index 8d925d91..ea8c6cf0 100644 --- a/command/config/config.go +++ b/command/config/config.go @@ -350,7 +350,7 @@ type EnvConfig struct { AutoInjectionBinaryURI string `envconfig:"DRONE_HARNESS_AUTO_INJECTION_BINARY_URI"` } LiteEngine struct { - Path string `envconfig:"DRONE_LITE_ENGINE_PATH" default:"https://github.com/harness/lite-engine/releases/download/v0.5.84/"` + Path string `envconfig:"DRONE_LITE_ENGINE_PATH" default:"https://github.com/harness/lite-engine/releases/download/v0.5.85/"` EnableMock bool `envconfig:"DRONE_LITE_ENGINE_ENABLE_MOCK"` MockStepTimeoutSecs int `envconfig:"DRONE_LITE_ENGINE_MOCK_STEP_TIMEOUT_SECS" default:"120"` } diff --git a/command/harness/helper.go b/command/harness/helper.go index 1a501bb2..44f40599 100644 --- a/command/harness/helper.go +++ b/command/harness/helper.go @@ -15,7 +15,7 @@ import ( func getStreamLogger(cfg leapi.LogConfig, logKey, correlationID string) *lelivelog.Writer { client := lestream.NewHTTPClient(cfg.URL, cfg.AccountID, cfg.Token, cfg.IndirectUpload, false) - wc := lelivelog.New(client, logKey, correlationID, nil, true) + wc := lelivelog.New(client, logKey, correlationID, nil, true, cfg.TrimNewLineSuffix) go func() { if err := wc.Open(); err != nil { logrus.WithError(err).Debugln("failed to open log stream") diff --git a/go.mod b/go.mod index d92bcce7..f95e44fb 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.3.0 github.com/google/wire v0.5.0 - github.com/harness/lite-engine v0.5.84 + github.com/harness/lite-engine v0.5.85 github.com/hashicorp/nomad/api v0.0.0-20230421025320-b4e6a70fe69b github.com/jmoiron/sqlx v1.3.5 github.com/joho/godotenv v1.5.1 diff --git a/go.sum b/go.sum index 804626fa..2d2a3c14 100644 --- a/go.sum +++ b/go.sum @@ -235,8 +235,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/harness/godotenv/v3 v3.0.1 h1:7QPEOkpx6SLLrYRRzPBp50d6c0XIxq721iqoFxbz1Bs= github.com/harness/godotenv/v3 v3.0.1/go.mod h1:UIXXJtTM7NkSYMYknHYOO2d8BfDlAWMYZRuRsXcDDR0= -github.com/harness/lite-engine v0.5.84 h1:BDsrC2KX6dR/Gx8mTYBg1F9rHCjwJDWo6uTywD8Bc0k= -github.com/harness/lite-engine v0.5.84/go.mod h1:CwyhOnIA6XDt/U02eKUXwT0hIMK4Q9uKG9LM86j7qns= +github.com/harness/lite-engine v0.5.85 h1:lfwQcpl/gVutdjfxSaFZT9EBaNTkMfnEIAOpoOpzuf8= +github.com/harness/lite-engine v0.5.85/go.mod h1:CwyhOnIA6XDt/U02eKUXwT0hIMK4Q9uKG9LM86j7qns= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/cronexpr v1.1.1 h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c=