Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [CI-14200]: Trimming new line suffix from Log Line to avoid extr… #515

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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