Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package okteto for openSUSE:Factory checked in at 2023-04-26 17:26:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/okteto (Old) and /work/SRC/openSUSE:Factory/.okteto.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "okteto" Wed Apr 26 17:26:50 2023 rev:47 rq:1082985 version:2.15.1 Changes: -------- --- /work/SRC/openSUSE:Factory/okteto/okteto.changes 2023-04-24 22:31:58.475782175 +0200 +++ /work/SRC/openSUSE:Factory/.okteto.new.1533/okteto.changes 2023-04-26 17:26:54.422164279 +0200 @@ -1,0 +2,7 @@ +Wed Apr 26 09:07:34 UTC 2023 - ka...@b1-systems.de + +- Update to version 2.15.1: + * Remove trailing whitespace on converted JSON log line (#3577) + (#3578) + +------------------------------------------------------------------- Old: ---- okteto-2.15.0.obscpio New: ---- okteto-2.15.1.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ okteto.spec ++++++ --- /var/tmp/diff_new_pack.BC4D82/_old 2023-04-26 17:26:55.790172260 +0200 +++ /var/tmp/diff_new_pack.BC4D82/_new 2023-04-26 17:26:55.794172284 +0200 @@ -19,7 +19,7 @@ %define __arch_install_post export NO_BRP_STRIP_DEBUG=true Name: okteto -Version: 2.15.0 +Version: 2.15.1 Release: 0 Summary: Develop your applications directly in your Kubernetes Cluster License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.BC4D82/_old 2023-04-26 17:26:55.834172517 +0200 +++ /var/tmp/diff_new_pack.BC4D82/_new 2023-04-26 17:26:55.838172540 +0200 @@ -3,10 +3,10 @@ <param name="url">https://github.com/okteto/okteto</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">2.15.0</param> + <param name="revision">2.15.1</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> - <param name="match-tag">2.15.0</param> + <param name="match-tag">2.15.1</param> </service> <service name="set_version" mode="disabled"> <param name="basename">okteto</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.BC4D82/_old 2023-04-26 17:26:55.858172657 +0200 +++ /var/tmp/diff_new_pack.BC4D82/_new 2023-04-26 17:26:55.858172657 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/okteto/okteto</param> - <param name="changesrevision">a663eaa13139627b071ff3411093a6d0944699ac</param></service></servicedata> + <param name="changesrevision">f435e0e8551b4483dd5fa6bb45376ccae8c90da8</param></service></servicedata> (No newline at EOF) ++++++ okteto-2.15.0.obscpio -> okteto-2.15.1.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/okteto-2.15.0/pkg/log/json.go new/okteto-2.15.1/pkg/log/json.go --- old/okteto-2.15.0/pkg/log/json.go 2023-04-18 13:05:54.000000000 +0200 +++ new/okteto-2.15.1/pkg/log/json.go 2023-04-25 15:55:04.000000000 +0200 @@ -19,6 +19,7 @@ "io" "strings" "time" + "unicode" "github.com/sirupsen/logrus" ) @@ -264,6 +265,7 @@ } func convertToJSON(level, stage, message string) string { + message = strings.TrimRightFunc(message, unicode.IsSpace) if stage == "" || message == "" { return "" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/okteto-2.15.0/pkg/log/json_test.go new/okteto-2.15.1/pkg/log/json_test.go --- old/okteto-2.15.0/pkg/log/json_test.go 1970-01-01 01:00:00.000000000 +0100 +++ new/okteto-2.15.1/pkg/log/json_test.go 2023-04-25 15:55:04.000000000 +0200 @@ -0,0 +1,99 @@ +// Copyright 2023 The Okteto Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package log + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_ConvertToJson(t *testing.T) { + defaultLevel := "info" + defaultStage := "some stage" + mockedTimestamp := int64(123) + + var tests = []struct { + name string + stage string + level string + message string + expected jsonMessage + }{ + { + name: "empty stage", + level: defaultLevel, + stage: "", + message: "foobar", + expected: jsonMessage{ + Timestamp: mockedTimestamp, + }, + }, + { + name: "empty message", + level: defaultLevel, + stage: defaultStage, + message: "", + expected: jsonMessage{ + Timestamp: mockedTimestamp, + }, + }, + { + name: "simple string", + level: defaultLevel, + stage: defaultStage, + message: "foobar", + expected: jsonMessage{ + Level: defaultLevel, + Stage: defaultStage, + Message: "foobar", + Timestamp: int64(mockedTimestamp), + }, + }, { + name: "leaving leading whitespace since it represents indentation", + level: defaultLevel, + stage: defaultStage, + message: " \t\nsome indented line", + expected: jsonMessage{ + Level: defaultLevel, + Stage: defaultStage, + Message: " \t\nsome indented line", + Timestamp: int64(mockedTimestamp), + }, + }, { + name: "removes trailing whitespace since each line should represent an individual line", + level: defaultLevel, + stage: defaultStage, + message: " some indented line \t\n", + expected: jsonMessage{ + Level: defaultLevel, + Stage: defaultStage, + Message: " some indented line", + Timestamp: int64(mockedTimestamp), + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + s := convertToJSON(tt.level, tt.stage, tt.message) + var resultJSON jsonMessage + json.Unmarshal([]byte(s), &resultJSON) + // Ignore timestamp in tests + resultJSON.Timestamp = mockedTimestamp + assert.Equal(t, tt.expected, resultJSON) + }) + } +} ++++++ okteto.obsinfo ++++++ --- /var/tmp/diff_new_pack.BC4D82/_old 2023-04-26 17:26:56.162174431 +0200 +++ /var/tmp/diff_new_pack.BC4D82/_new 2023-04-26 17:26:56.166174454 +0200 @@ -1,5 +1,5 @@ name: okteto -version: 2.15.0 -mtime: 1681815954 -commit: a663eaa13139627b071ff3411093a6d0944699ac +version: 2.15.1 +mtime: 1682430904 +commit: f435e0e8551b4483dd5fa6bb45376ccae8c90da8 ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/okteto/vendor.tar.gz /work/SRC/openSUSE:Factory/.okteto.new.1533/vendor.tar.gz differ: char 5, line 1