Skip to content

Commit

Permalink
fix: [CI-14200]: Trimming new line suffix from Log Line to avoid extr…
Browse files Browse the repository at this point in the history
…a new line space (#515)
  • Loading branch information
ShobhitSingh11 authored Oct 28, 2024
1 parent 57d223a commit 742ca73
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion command/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand Down
2 changes: 1 addition & 1 deletion command/harness/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit 742ca73

Please sign in to comment.