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

graphite provider treats empty result as an error #3503

Open
2 tasks done
tomasz-torcz-airspace-intelligence opened this issue Apr 4, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@tomasz-torcz-airspace-intelligence

Checklist:

  • I've included steps to reproduce the bug.
  • I've included the version of argo rollouts.

Describe the bug

We are using Graphite as a metric provider, and in AnalysisTemplate we check for number of errors in last few minutes. When there are no errors from the component, graphite returns empty set. This is treated by provider as an error:

if len(result) == 0 {
return metricutil.MarkMeasurementError(newMeasurement, errors.New("no values found"))
}

Empty set of errors is an indicator of lack of errors, so it should be ok.
Moreover, this is expected for other providers -- documentation mentions how to deal with empty sets and recommends including len(results) > 0 || … in successCondition. This workaround does not work with Graphite provider, due to hardcoded fail on empty results set.

To Reproduce

Have and Graphite-using AnalyzeTemplate with settings like:

      successCondition: "len(result) > 0 ? result[0] < 1 : true"
      provider:
        graphite:
          address: http://{{ $.Values.metrics.graphiteHost }}:8080
          query: |
            target=sum(
              summarize(stats_counts.service_name.error_class.*,"2minutes","sum")
            )

Expected behavior

Empty result set should be surfaced to AnalysisRun and interpreted there.

Screenshots

Version

Rollouts v1.6.6

Logs

# Paste the logs from the rollout controller

# Logs for the entire controller:
kubectl logs -n argo-rollouts deployment/argo-rollouts

# Logs for a specific rollout:
kubectl logs -n argo-rollouts deployment/argo-rollouts | grep rollout=<ROLLOUTNAME

Message: Metric "error-rate-ra-model" assessed Error due to consecutiveErrors (5) > consecutiveErrorLimit (4): "Error Message: no values found"


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

@tomasz-torcz-airspace-intelligence tomasz-torcz-airspace-intelligence added the bug Something isn't working label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant