Skip to content

fix(helm): maintain any existing comments in Chart.yaml#1968

Merged
chingor13 merged 1 commit intogoogleapis:mainfrom
ben-foxmoore:switch-yaml-lib
May 31, 2023
Merged

fix(helm): maintain any existing comments in Chart.yaml#1968
chingor13 merged 1 commit intogoogleapis:mainfrom
ben-foxmoore:switch-yaml-lib

Conversation

@ben-foxmoore
Copy link
Copy Markdown
Contributor

As raised in #1944, the current approach for Helm charts (using js-yaml library) strips all comments from the file. This PR switches to using the popular yaml library (eemeli/yaml), and then patching the version value directly. This helps maintain any comments which have been added to the Chart.yaml - Renovate comments are the driving cause in our case.

Fixes #1944 🦕

@ben-foxmoore ben-foxmoore requested review from a team May 31, 2023 15:35
@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 31, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label Bot added the size: s Pull request size is small. label May 31, 2023
@ben-foxmoore
Copy link
Copy Markdown
Contributor Author

CLA has just been signed.

Copy link
Copy Markdown
Contributor

@chingor13 chingor13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks great!

@chingor13 chingor13 merged commit 77de40e into googleapis:main May 31, 2023
@raja-anbazhagan
Copy link
Copy Markdown

@chingor13 @ben-foxmoore. This issue relapsed again on latest versions.

https://github.com/googleapis/release-please/blob/422df5a6a9d44a52c6c682563d1795b8fd246215/package.json#L89C1-L90C1

I have Chart.yaml with # x-release-please-start-version # x-release-please-end comments. But they are absolutely being scrapped.

@raja-anbazhagan
Copy link
Copy Markdown

This issue relapsed again on latest versions.

nevermind. I just had to use generic type to override file extension based updates.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve comments in Helm Chart.yaml when updating version

3 participants