sonatype-nexus-community / nexus-repository-helm

At the Helm, Helm Yeah, v k8s
Eclipse Public License 1.0
97 stars 71 forks source link

Helm repository indexes wrong metadata #165

Open webmutation opened 3 years ago

webmutation commented 3 years ago

I am reporting this bug has it can potentially create a big amount of problems for deployment. Making it possible to deploy different versions than the ones expected and failing to create new versions if helm nexus metadata is wrongly associated with file.

We faced this strange behavior recently. A file was uploaded with the wrong Chart version creating a link in the metadata for a version 1.0.0-SNAPSHOT associated with helmchart-1.5.0-SNAPSHOT.tgz

image

However that helmchart-1.5.0-SNAPSHOT.tgz file was rebuild and the Chart yaml was corrected with version 1.5.0-SNAPSHOT, a new upload to nexus and the file is still associated with version 1.0.0-SNAPSHOT even though inside the file the Chart is 1.5.0-SNAPSHOT, meaning this version will never get correctly published unless version 1.0.0-SNAPSHOT is removed manually from the helm index.

Current Behavior

Expected Behavior

Possible solution On handling the upload, verify if the version of the uploaded Chart yaml matches existing nexus helm metadata version, throw error 400 Bad Request if it does not match. Update blob if it matches. Create new version if Chart yaml version does not exist in nexus helm metadata.

mlukaretkyi commented 3 years ago

Hi, we are moving helm source code to nexus public. This github page will be archived. Your issue https://issues.sonatype.org/browse/NEXUS-25199