Fix: Prints should always include new lines (#102795)

* CI: Allow Bench conversion to fail

We shouldn't mark PRs and commits as X if they fail to convert logs with Bench.

* Fix: Prints should always include new lines

* fix: remove unused import
This commit is contained in:
Mariell Hoversholm
2025-03-27 12:27:53 +01:00
committed by GitHub
parent 9094c73e33
commit e1e1d3fd9f
15 changed files with 40 additions and 32 deletions
@@ -210,7 +210,7 @@ var objectToStringConverter = data.FieldConverter{
data, err := json.Marshal(kustoValue)
if err != nil {
fmt.Printf("failed to marshal column value: %s", err)
return nil, fmt.Errorf("failed to marshal column value: %w", err)
}
asString := string(data)
+3 -1
View File
@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"io"
"log/slog"
"runtime/debug"
"time"
@@ -265,7 +266,8 @@ func copyData(field *data.Field, col arrow.Array) error {
case arrow.DURATION:
copyBasic[int64](field, array.NewInt64Data(colData))
default:
fmt.Printf("datatype %s is unhandled", col.DataType().ID())
// FIXME: Should this return an error instead?
slog.Error("datatype is unhandled", "type", col.DataType().ID())
}
return nil
@@ -3,6 +3,7 @@ package converter
import (
"errors"
"fmt"
"log/slog"
"strconv"
"time"
@@ -362,7 +363,7 @@ func typeOf(value interface{}) data.FieldType {
case *bool:
return data.FieldTypeNullableBool
default:
fmt.Printf("unknown value type: %v", v)
slog.Error("unknown influx value type", "value", v)
return data.FieldTypeNullableJSON
}
}