cortex icon indicating copy to clipboard operation
cortex copied to clipboard

fixing unnecessary fields in rule_groups api

Open jmoscoso1 opened this issue 3 years ago • 1 comments

What this PR does: ruler/rule_groups api returns unnecessary fields. This pr fixes that issue.

Before fix:

> curl http://localhost:9009/ruler/rule_groups
fake:
  rules.yaml:
  - name: blah
    interval: 1m
    rules:
    - record:
        kind: 8
        style: 0
        tag: '!!str'
        value: blah1
        anchor: ""
        alias: null
        content: []
        headcomment: ""
        linecomment: ""
        footcomment: ""
        line: 0
        column: 0
      expr:
        kind: 8
        style: 0
        tag: '!!str'
        value: sum(up)
        anchor: ""
        alias: null
        content: []
        headcomment: ""
        linecomment: ""
        footcomment: ""
        line: 0
        column: 0

After Fix:

> curl http://localhost:9009/ruler/rule_groups
fake:
    rules.yaml:
        - name: blah
          interval: 1m
          rules:
            - record: blah1
              expr: sum(up)

Which issue(s) this PR fixes: Fixes #4283

Checklist

  • [ X] Tests updated
  • [ ] Documentation added
  • [X] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

jmoscoso1 avatar Jun 28 '22 20:06 jmoscoso1

LGTM! Congrats on your first OSS PR Juan.

harry671003 avatar Jun 28 '22 23:06 harry671003