cortex
cortex copied to clipboard
fixing unnecessary fields in rule_groups api
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.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]
LGTM! Congrats on your first OSS PR Juan.