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

Broken Datadog apiVersion v1 analyses by default in v1.7.0 #3641

Closed
2 tasks done
aguiraorodriguez opened this issue Jun 17, 2024 · 0 comments · Fixed by #3643
Closed
2 tasks done

Broken Datadog apiVersion v1 analyses by default in v1.7.0 #3641

aguiraorodriguez opened this issue Jun 17, 2024 · 0 comments · Fixed by #3643
Labels
bug Something isn't working cherry-pick/release-1.7

Comments

@aguiraorodriguez
Copy link

aguiraorodriguez commented Jun 17, 2024

Checklist:

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

Describe the bug

Datadog analyses that don't specify a version default to v1 and the new field aggregator defaults to last in the CRD. So, an existing v1 analysis will fail with this error:

time="2024-06-17T10:24:26Z" level=warning msg="Measurement had error: Aggregator is not supported in v1. Please review the Analysis Template." analysisrun=podinfo-856d6c544-278-4 metric=latency-slo namespace=example

This test is not catching this case because the metric object doesn't reproduce the default last value of aggregator.

To Reproduce

Given this spec of an analysis:

spec:
  args:
    - name: service-name
    - name: environment
    - name: clusterName
  metrics:
    - count: 3
      failureLimit: 2
      interval: 60s
      name: latency-slo
      provider:
        datadog:
          apiVersion: v1
          interval: 60s
          query: |
            sum:http_request_duration_seconds.bucket{
              upper_bound:0.5,
              short_image:sre-podinfo,
              kube_namespace:example,
              env:{{args.environment}},
              kube_cluster_name:{{args.clusterName}},
              kube_service:{{args.service-name}}
            }.as_rate() /
            sum:http_request_duration_seconds.count{
              short_image:sre-podinfo,
              kube_namespace:example,
              env:{{args.environment}},
              kube_cluster_name:{{args.clusterName}},
              kube_service:{{args.service-name}}
            }.as_rate()
      successCondition: result >= 0.95

when migrating from Argo Rollouts 1.6.x to 1.7.0, the next run will fail with:

time="2024-06-17T10:24:26Z" level=warning msg="Measurement had error: Aggregator is not supported in v1. Please review the Analysis Template." analysisrun=podinfo-856d6c544-278-4 metric=latency-slo namespace=example

Expected behavior

The analysis should still use the implicit apiVersion v1 and thus pass.

Screenshots

Version

v1.7.0

Logs

time="2024-06-17T10:24:26Z" level=warning msg="Measurement had error: Aggregator is not supported in v1. Please review the Analysis Template." analysisrun=podinfo-856d6c544-278-4 metric=latency-slo namespace=example

Message from the maintainers:

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

@aguiraorodriguez aguiraorodriguez added the bug Something isn't working label Jun 17, 2024
@aguiraorodriguez aguiraorodriguez changed the title Broken DataDog v1 analyses by default in v1.7.0 Broken Datadog v1 analyses by default in v1.7.0 Jun 17, 2024
@aguiraorodriguez aguiraorodriguez changed the title Broken Datadog v1 analyses by default in v1.7.0 Broken Datadog apiVersion v1 analyses by default in v1.7.0 Jun 17, 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 cherry-pick/release-1.7
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants