You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Summary
Whenever we raise a PR to the https://github.com/mongodb/helm-charts/
repo to release the helm chart, as part of the CI linting of the chart
is done.
And that linting fails because there are some issues in our chart. The
issue is a space character at the end of this file
[here](https://github.com/mongodb/mongodb-kubernetes/blob/1.3.0/helm_chart/Chart.yaml#L4).
To get the PR in, in the `helm-charts` repo we just fixed the problem in
that repo and didn't make the changes here in the MCK repo. This PR
makes the change in MCK repo and in the next PR I am going to add chart
linting as part of the lint_repo task so that we will always lint of
charts.
When we just go ahead and remove the trailing space from the mentioned
line, our pre-commit hook doesn't pass. And the reason is when
pre-commit hooks tries to update the version is chart.yaml
[here](https://github.com/mongodb/mongodb-kubernetes/blob/1.3.0/scripts/evergreen/release/update_helm_values_files.py#L87),
the library (`ruamel.yaml.YAML()`) that is used to update the yaml
automatically adds a trailing space in [that
line](https://github.com/mongodb/mongodb-kubernetes/blob/1.3.0/helm_chart/Chart.yaml#L4).
So, in other words, even if we manually remove the trailing space, our
CI complains that there are some files that are not added after running
pre-commit, and when we run pre-commit, the extra trailing space is
added automatically.
To fix that problem we are slightly changing the way we were adding
description to the chart.yaml, and now we are using the correct way of
adding multi line values in a yaml file.
## Proof of Work
```
ct lint --charts=helm_chart/ vivek.s@M-HYXVRF7WDG
Linting charts...
Version increment checking disabled.
------------------------------------------------------------------------------------------------------------------------
Charts to be processed:
------------------------------------------------------------------------------------------------------------------------
mongodb-kubernetes => (version: "1.3.0", path: "helm_chart/")
------------------------------------------------------------------------------------------------------------------------
Linting chart "mongodb-kubernetes => (version: \"1.3.0\", path: \"helm_chart/\")"
Validating helm_chart/Chart.yaml...
Validation success! 👍
Validating maintainers...
==> Linting helm_chart/
1 chart(s) linted, 0 chart(s) failed
------------------------------------------------------------------------------------------------------------------------
✔︎ mongodb-kubernetes => (version: "1.3.0", path: "helm_chart/")
------------------------------------------------------------------------------------------------------------------------
All charts linted successfully
```
## Checklist
- [ ] Have you linked a jira ticket and/or is the ticket in the title?
- [x] Have you checked whether your jira ticket required DOCSP changes?
- [x] Have you added changelog file?
- use `skip-changelog` label if not needed
- refer to [Changelog files and Release
Notes](https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes)
section in CONTRIBUTING.md for more details
0 commit comments