Skip to content

fixing unnecessary fields in rule_groups api #4767

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

Merged
merged 2 commits into from
Aug 17, 2022

Conversation

jmoscoso1
Copy link
Contributor

@jmoscoso1 jmoscoso1 commented Jun 28, 2022

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
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@jmoscoso1 jmoscoso1 force-pushed the ruler_api_bug_fix branch 2 times, most recently from dd1f21c to 230dc3d Compare June 28, 2022 21:33
@harry671003
Copy link
Contributor

LGTM! Congrats on your first OSS PR Juan.

@jmoscoso1 jmoscoso1 force-pushed the ruler_api_bug_fix branch from 230dc3d to c41cf8b Compare June 29, 2022 15:50
Signed-off-by: jmoscoso1 <juanmoscoso2004@gmail.com>
Signed-off-by: Alan Protasio <approtas@amazon.com>
@alanprot alanprot requested a review from alvinlin123 August 17, 2022 22:38
@alanprot alanprot merged commit c930bd6 into cortexproject:master Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/ruler/rule_groups returns YAML with extra fields
4 participants