-
Notifications
You must be signed in to change notification settings - Fork 904
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
DataDog provider should allow dealing with no data points returned #1548
Comments
@jessesuen Thank you for making this issue. I'll take a look at it. |
I think to fix this:
return "", v1alpha1.AnalysisPhaseError, fmt.Errorf("Datadog returned no value: %s", string(bodyBytes)) we instead call EvaluateResult the result and give value of nil. e.g.: evaluate.EvaluateResult(nil, metric, p.logCtx)
|
Yeah, this has to break backwards compatibility for the solution to work one way or another.. still thinking it through. Trying not to change the plumbing in the datadog provider, but rather provide extra hooks for the Developer when writing success/failure conditions. If I were to follow the first option, it would break. I cannot pass in I'm adding more logic to preprocess if pointers are provided to the evaluation |
Signed-off-by: Ryan M Smith <[email protected]>
Signed-off-by: Ryan M Smith <[email protected]>
Signed-off-by: Ryan M Smith <[email protected]>
Signed-off-by: Ryan M Smith <[email protected]>
Signed-off-by: Ryan M Smith <[email protected]>
Signed-off-by: Ryan M Smith <[email protected]>
Signed-off-by: Ryan M Smith <[email protected]>
Signed-off-by: Ryan M Smith <[email protected]>
@jessesuen Ready for review: #1551 👍 🙏 |
Signed-off-by: Ryan M Smith <[email protected]>
Signed-off-by: Ryan M Smith <[email protected]>
Signed-off-by: Ryan M Smith <[email protected]>
Signed-off-by: Ryan M Smith <[email protected]>
Summary
When there are no data points in a DataDog query, we automatically return error:
Datadog returned no value
with no ability to change this behavior. However, some users may want to consider this scenario a success. The code which prevents users from deciding how to handle this is here:argo-rollouts/metricproviders/datadog/datadog.go
Lines 142 to 150 in f5e2d82
The above logic does not allow a query to return with no datapoints because we error if the array length is 0.
One possible solution, is to modify this code and allow the result to return as
nil
without marking the measurement as error. Then, users could decide how to deal with this by writing an expression like:A caveat is that I forget if expr library allows for polymorphic values where result may be a float or nil and compared using built-in operators. But if it doesn't, we could always add a convenience function,
IsNil()
to allow users to deal with it.Diagnostics
What version of Argo Rollouts are you running? v1.1.0-rc1
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.
The text was updated successfully, but these errors were encountered: