-
Notifications
You must be signed in to change notification settings - Fork 314
Preserve formatting in Helm values files #1166
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
base: master-annotation-based
Are you sure you want to change the base?
Preserve formatting in Helm values files #1166
Conversation
Signed-off-by: Graham Beckley <gbeckley@mozilla.com>
Signed-off-by: Graham Beckley <gbeckley@mozilla.com>
Signed-off-by: Graham Beckley <gbeckley@mozilla.com>
Signed-off-by: Graham Beckley <gbeckley@mozilla.com>
Signed-off-by: Graham Beckley <gbeckley@mozilla.com>
Signed-off-by: Graham Beckley <gbeckley@mozilla.com>
Signed-off-by: Graham Beckley <gbeckley@mozilla.com>
9438961 to
d67d921
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1166 +/- ##
==========================================
- Coverage 63.27% 62.74% -0.53%
==========================================
Files 15 15
Lines 2358 2365 +7
==========================================
- Hits 1492 1484 -8
- Misses 771 782 +11
- Partials 95 99 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Graham Beckley <gbeckley@mozilla.com>
Signed-off-by: Graham Beckley <gbeckley@mozilla.com>
|
Thanks for the contribution, @grahamalama. PRs #1055 and #1062, based on #1039, were merged and included in v0.16.0. |
|
@chengfang ahh I see. So it seems the final version of the formatting changes you mentioned do not use vs something like: goccy/go-yaml seems to handle both of these things, so I see some benefit of adopting that library as it would lead to overall less noisy diffs when applying updates. What should I do with this PR? I'm sure it's not desirable to have 2 different yaml libraries in use simultaneously in the project, but if using |
|
@grahamalama just noticed this one, I wrote a couple of the PRs mentioned above. The indentation of sequences was a deliberate choice in goyaml v3: see go-yaml/yaml#661 and the many, many related discussions. Partly this goes back to, IIRC, goyaml having jumped the other way in v2, breaking the formatting used in k8s, which then led to the entire k8s ecosystem relying on a fork of goyaml to avoid - you guessed it, noisy diffs. |
Welp, I spent quite some time writing this PR to preserve formatting in Helm values files only to discover that there was already some activity in this area, namely #1039 and this branch referenced in that PR.
You can consider this another implementation and maybe decide between the two approaches. There's still more polish I could add, but since I discovered #1039, I thought I'd get this PR up to see if I should keep working on it.
Whether this PR or #1039, it'd be nice to get this general feature of preserving the formatting of Helm values files in.