-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Adds support for prettifying rules file #11233
Adds support for prettifying rules file #11233
Conversation
09abdac
to
2873321
Compare
Signed-off-by: Harkishen-Singh <[email protected]> This comment adds support for prettifying rules file accepted from `promtool prettify rules <files>`. It also adds support for prettifying a single PromQL expression via `promtool prettify query <promql-expr>`.
2873321
to
bf0b364
Compare
groups: | ||
- name: Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This output is from encoding yaml.Node
. The indentation looks strange. I am not sure how to fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Harkishen-Singh SetIndent(2)
on the v3 encoder will change the indent to 2 spaces rather than 4. However, to prevent the sequence indicator being included in the indentation you'd need to pull in go-yaml/yaml#753, probably easiest way would be to switch to the upcoming fork being used in kube/kustomize kubernetes-sigs/yaml#72
Hello @Harkishen-Singh, we have looked at this during the bug scrub. I will review this, in the meantime, are you willing to rebase the pull request? Thanks! |
Looking at this during the bug scrub again. @Harkishen-Singh doesn't seem to be able to come back to this. @roidelapluie how should we proceed here? Since you wanted to review this anyway, could you just take it over, do the rebase and any changes you feel necessary, and then we review it among ourselves? |
We came back around to this at the bug-scrub; since there was no update in 9 months we will close. Feel free to re-open if you do come back to it. |
Signed-off-by: Harkishen-Singh [email protected]
This comment adds support for prettifying rules file
accepted from
promtool prettify rules <files>
.It also adds support for prettifying a single PromQL expression via
promtool prettify query <promql-expr>
.