Skip to content

Commit

Permalink
fix(user-agent): do not append Runtime version if absent
Browse files Browse the repository at this point in the history
  • Loading branch information
masontikhonov committed Dec 2, 2024
1 parent a829e23 commit 37e6304
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion venona/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,13 @@ func run(options startOptions) {

httpClient.Transport = monitor.NewRoundTripper(httpClient.Transport)

userAgent := fmt.Sprintf("cf-classic-runner/%s", version)
if runtimeVersion := os.Getenv("RUNTIME_CHART_VERSION"); runtimeVersion != "" {
userAgent += fmt.Sprintf(" cf-classic-runtime/%s", runtimeVersion)
}
httpHeaders := http.Header{}
{
httpHeaders.Add("User-Agent", fmt.Sprintf("cf-classic-runner/%s,cf-classic-runtime/%s", version, os.Getenv("RUNTIME_CHART_VERSION")))
httpHeaders.Add("User-Agent", userAgent)
}

cf = codefresh.New(codefresh.Options{
Expand Down

0 comments on commit 37e6304

Please sign in to comment.