OpenSLO / oslo

CLI tool for the OpenSLO spec
Apache License 2.0
203 stars 36 forks source link

CloudWatch SLI causes error when converting #183

Open ian-bartholomew opened 1 year ago

ian-bartholomew commented 1 year ago

Summary

when unmarshaling CloudWatch data, the sequence nodes are getting improperly unmarshaled, causing an error when running olso convert

Steps to reproduce

Given file sli.yaml:

apiVersion: openslo/v1
kind: SLI
metadata:
  name: foo-sli
spec:
  description: string # optional up to 1050 characters
  thresholdMetric: 
    metricSource:
      metricSourceRef: foo-cloudwatch
      type: CloudWatch
      spec:
        metricName: 2xx
        namespace: CloudWatchSynthetics
        region: us-east-1
        stat: SampleCount
        dimensions:
          - name: following
            value: bar

run oslo convert -f sli.yaml -o nobl9

What is the current bug behavior?

This will cause an error

What is the expected correct behavior?

The yaml should be correctly parsed and the nobl9 yaml produced

ian-bartholomew commented 1 year ago

Seeing that this might not have solved for all use cases so reopening