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

Chart.yaml version should be parsed as semver so that matching it against requirements from chartfile.yaml works properly #701

Closed
kklimonda-fn opened this issue May 6, 2022 · 0 comments · Fixed by #702

Comments

@kklimonda-fn
Copy link
Contributor

version for charts defined in chartfile.yaml is parsed via semver module, but version from any given chart's Chart.yaml is not, instead we do a string comparison: if chartYAML.Version == r.Version.String() {

This breaks for charts that are not 100% compliant with semver spec, and prefix version with v, for example jetstack/cert-manager defines version as v1.8.0 and currently this is never correctly matched by tanka, resulting in the chart being re-downloaded on every tk tool charts vendor run.

kklimonda-fn added a commit to kklimonda-fn/tanka that referenced this issue May 6, 2022
When chartfile.yaml requirements are parsed, version string is converted into a
semver.Version struct, dropping "optional" v prefix from the version. Match
this behaviour for Chart.yaml version so that they can be compared with each
other.

Closes grafana#701
@kklimonda-fn kklimonda-fn changed the title Chart.yaml should be parsed as semver so that matching it against chartfile.yaml works properly Chart.yaml version should be parsed as semver so that matching it against requirements from chartfile.yaml works properly May 6, 2022
julienduchesne pushed a commit that referenced this issue May 19, 2022
When chartfile.yaml requirements are parsed, version string is converted into a
semver.Version struct, dropping "optional" v prefix from the version. Match
this behaviour for Chart.yaml version so that they can be compared with each
other.

Closes #701
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 a pull request may close this issue.

1 participant