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

execution: fix min/max aggregators #335

Merged

Conversation

MichaHoffmann
Copy link
Contributor

without the fix:

=== RUN   TestInstantQuery/disableOptimizers=true/fuzz_-_min_with_Inf#02
=== RUN   TestInstantQuery/disableOptimizers=true/fuzz_-_min_with_Inf#02/disableFallback=false
    testutil.go:91: engine_test.go:3868: ""

        	exp: &promql.Result{Err:error(nil), Value:promql.Vector{promql.Sample{T:50000, F:9.223372036854776e+18, H:(*histogram.FloatHistogram)(nil), Metric:labels.Labels{labels.Label{Name:"pod", Value:"nginx-1"}, labels.Label{Name:"route", Value:"/"}}}, promql.Sample{T:50000, F:9.223372036854776e+18, H:(*histogram.FloatHistogram)(nil), Metric:labels.Labels{labels.Label{Name:"pod", Value:"nginx-2"}, labels.Label{Name:"route", Value:"/"}}}}, Warnings:annotations.Annotations(nil)}

        	got: &promql.Result{Err:error(nil), Value:promql.Vector{promql.Sample{T:50000, F:+Inf, H:(*histogram.FloatHistogram)(nil), Metric:labels.Labels{labels.Label{Name:"pod", Value:"nginx-1"}, labels.Label{Name:"route", Value:"/"}}}, promql.Sample{T:50000, F:+Inf, H:(*histogram.FloatHistogram)(nil), Metric:labels.Labels{labels.Label{Name:"pod", Value:"nginx-2"}, labels.Label{Name:"route", Value:"/"}}}}, Warnings:annotations.Annotations{}}

        Diff:
        --- Expected
        +++ Actual
        @@ -1,3 +1,3 @@
        -(*promql.Result)({pod="nginx-1", route="/"} => 9223372036854776000 @[50000]
        -{pod="nginx-2", route="/"} => 9223372036854776000 @[50000])
        +(*promql.Result)({pod="nginx-1", route="/"} => +Inf @[50000]
        +{pod="nginx-2", route="/"} => +Inf @[50000])



=== RUN   TestInstantQuery/disableOptimizers=true/fuzz_-_min_with_NaN#03
=== RUN   TestInstantQuery/disableOptimizers=true/fuzz_-_min_with_NaN#03/disableFallback=false
    testutil.go:91: engine_test.go:3868: ""

        	exp: &promql.Result{Err:error(nil), Value:promql.Vector{}, Warnings:annotations.Annotations(nil)}

        	got: &promql.Result{Err:error(nil), Value:promql.Vector{promql.Sample{T:50000, F:NaN, H:(*histogram.FloatHistogram)(nil), Metric:labels.Labels{labels.Label{Name:"pod", Value:"nginx-1"}, labels.Label{Name:"route", Value:"/"}}}, promql.Sample{T:50000, F:NaN, H:(*histogram.FloatHistogram)(nil), Metric:labels.Labels{labels.Label{Name:"pod", Value:"nginx-2"}, labels.Label{Name:"route", Value:"/"}}}}, Warnings:annotations.Annotations{}}

        Diff:
        --- Expected
        +++ Actual
        @@ -1,2 +1,3 @@
        -(*promql.Result)()
        +(*promql.Result)({pod="nginx-1", route="/"} => NaN @[50000]
        +{pod="nginx-2", route="/"} => NaN @[50000])

Signed-off-by: Michael Hoffmann <[email protected]>
@MichaHoffmann MichaHoffmann force-pushed the mhoffm-fix-some-fuzzing-issues branch from 998f075 to ee66863 Compare November 26, 2023 11:28
@MichaHoffmann MichaHoffmann merged commit f3dcefe into thanos-io:main Nov 29, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants