diff --git a/promql/engine_test.go b/promql/engine_test.go index 7e18b764f3..3cf881b88e 100644 --- a/promql/engine_test.go +++ b/promql/engine_test.go @@ -20,6 +20,7 @@ import ( "math" "os" "path/filepath" + "slices" "sort" "strings" "sync" @@ -3758,6 +3759,8 @@ func TestTypeUnitMismatchAnnotations(t *testing.T) { require.NoError(t, res.Err) warnings, infos := res.Warnings.AsStrings(testCase.expr, 0, 0) + slices.Sort(warnings) + slices.Sort(infos) testutil.RequireEqual(t, testCase.expectedWarningAnnotations, warnings) testutil.RequireEqual(t, testCase.expectedInfoAnnotations, infos) }) diff --git a/storage/type_unit_mismatch_storage.go b/storage/type_unit_mismatch_storage.go index 87a98b09dc..8b868812e6 100644 --- a/storage/type_unit_mismatch_storage.go +++ b/storage/type_unit_mismatch_storage.go @@ -16,6 +16,7 @@ package storage import ( "context" "fmt" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/util/annotations" )