Argo Rollout AnalysisRun datadog with incomplete options

93 views Asked by At

I have the following analysis template:

apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata:
  name: error-rate
spec:
  args:
  - name: apmname
    value: microservicename
  - name: version
    value: master
  metrics:
  - name: error-rate
    interval: 1m
    successCondition: default(result, 0) <= 100
    failureLimit: 3
    provider:
      datadog:
        apiVersion: v2
        interval: 5m
        queries:
          a: sum:trace.handle.request.errors{service:{{args.apmname}},version:{{args.version}}}.as_count()
          b: sum:trace.handle.request.hits{service:{{args.apmname}},version:{{args.version}}}.as_count()
        formula: "100 * a/b"

When the rollout executes the analysis and generates the analysisrun it fails with the following error:

     message: 'received non 2xx response code: 400 {"errors":["Error parsing query:
      unable to parse : Rule ''query_expr'' didn''t match at '''' (line 1, column
      1)."]}'

Reviewing the resource created by the rollout, I observe that it does not take the formula and queries values.

apiVersion: argoproj.io/v1alpha1
kind: AnalysisRun
metadata:
  annotations:
    rollout.argoproj.io/revision: "3"
  creationTimestamp: "2023-12-13T15:58:48Z"
  generation: 6
  labels:
    app: microservicename
    rollout-type: Background
    rollouts-pod-template-hash: 6f6ccb8f55
  name: microservicename-6f6ccb8f55-3
  namespace: homo
  ownerReferences:
  - apiVersion: argoproj.io/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: Rollout
    name: microservicename
    uid: af39838e-9f51-4444-b2f0-ed833b2182c1
  resourceVersion: "722659980"
  uid: 84b480c4-ca6b-40fa-b669-6da111b41ddf
spec:
  args:
  - name: apmname
    value: microservicename
  - name: version
    value: master
  metrics:
  - failureLimit: 3
    interval: 1m
    name: error-rate
    provider:
      datadog:
        apiVersion: v2
        interval: 5m
        query: ""
    successCondition: default(result, 0) <= 100

I am using the following version of argo rollout: CHART APP VERSION argo-rollouts-2.32.5 v1.6.2

What is this problem due to?

0

There are 0 answers