diff --git a/go.mod b/go.mod index 194ea42f40..2a99b2b763 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/argoproj/argo-rollouts go 1.20 require ( - github.com/antonmedv/expr v1.13.0 + github.com/antonmedv/expr v1.15.0 github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 github.com/argoproj/pkg v0.13.6 github.com/aws/aws-sdk-go-v2 v1.21.0 diff --git a/go.sum b/go.sum index 391f548a45..a287a84606 100644 --- a/go.sum +++ b/go.sum @@ -91,8 +91,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.13.0 h1:8YrTtlCzlOtXw+hpeCLDLL2uo0C0k6jmYpYTGws5c5w= -github.com/antonmedv/expr v1.13.0/go.mod h1:FPC8iWArxls7axbVLsW+kpg1mz29A1b2M6jt+hZfDkU= +github.com/antonmedv/expr v1.15.0 h1:sBHNMx1i+b1lZfkBFGhicvSLW6RLnca3R0B7jWrk8iM= +github.com/antonmedv/expr v1.15.0/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4JUv1ihsE= github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902 h1:JnW6RNwSxFwf4qQf3d6n+LhTODzmrLpDx2mQMPYzKf8= github.com/argoproj/notifications-engine v0.4.1-0.20230712163936-39dfcb66f902/go.mod h1:W//xreL6/AGmJdh6SyvmJhOZ1VweW6DBm8qSBx7NO1M= diff --git a/metricproviders/prometheus/prometheus_test.go b/metricproviders/prometheus/prometheus_test.go index 8b077930a5..ea7c3e1eb8 100644 --- a/metricproviders/prometheus/prometheus_test.go +++ b/metricproviders/prometheus/prometheus_test.go @@ -400,7 +400,7 @@ func TestProcessVectorResponse(t *testing.T) { logCtx: *logCtx, } metric := v1alpha1.Metric{ - SuccessCondition: "10 in result", + SuccessCondition: "float(10) in result", FailureCondition: "len(result) != 2", } diff --git a/metricproviders/wavefront/wavefront_test.go b/metricproviders/wavefront/wavefront_test.go index af8bd53e7f..a7d2ae9fec 100644 --- a/metricproviders/wavefront/wavefront_test.go +++ b/metricproviders/wavefront/wavefront_test.go @@ -176,7 +176,7 @@ func TestProcessMultipleTimeseriesResponse(t *testing.T) { logCtx: *logCtx, } metric := v1alpha1.Metric{ - SuccessCondition: "10 in result", + SuccessCondition: "float(10) in result", FailureCondition: "len(result) != 2", } diff --git a/utils/evaluate/evaluate_test.go b/utils/evaluate/evaluate_test.go index e058d2aa4b..913528238b 100644 --- a/utils/evaluate/evaluate_test.go +++ b/utils/evaluate/evaluate_test.go @@ -144,7 +144,7 @@ func TestEvaluateArray(t *testing.T) { func TestEvaluateInOperator(t *testing.T) { floats := []float64{float64(2), float64(2)} - b, err := EvalCondition(floats, "2 in result") + b, err := EvalCondition(floats, "float(2) in result") assert.Nil(t, err) assert.True(t, b) }