Skip to content
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

Closed

Conversation

Harkishen-Singh
Copy link
Contributor

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>.

@Harkishen-Singh Harkishen-Singh changed the title Add support for prettify rules file. Adds support for prettify rules file. Aug 30, 2022
@Harkishen-Singh Harkishen-Singh changed the title Adds support for prettify rules file. Adds support for prettifying rules file Aug 30, 2022
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>`.
Comment on lines +1 to +2
groups:
- name: Test
Copy link
Contributor Author

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.

Copy link

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

@roidelapluie roidelapluie self-assigned this Jul 18, 2023
@roidelapluie
Copy link
Member

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!

@beorn7
Copy link
Member

beorn7 commented Dec 12, 2023

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?

@bboreham
Copy link
Member

bboreham commented Oct 8, 2024

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.

@bboreham bboreham closed this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants