Details
-
Type:
Bug
-
Status: New
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 3.32.0
-
Fix Version/s: None
-
Component/s: helm
-
Labels:
-
Notability:3
Description
ISSUE:
The default version used by helm clients seems to pick the first version in the index.yaml (eg. Rancher, Lens).
Also, by looking at some index.yaml used in the remote site (eg. Bitnami), it's also sorted by the "version" as semver.
But the index.yaml generated by Nexus looks like alphabetical order (old one first), so that users need to be careful to install package from Nexus helm hosted repository.
REPRODUCE STEPS:
- Create a helm-hosted repo
- Download test packages:
curl -O https://charts.bitnami.com/bitnami/node-11.4.13.tgz curl -O https://charts.bitnami.com/bitnami/node-11.4.15.tgz
- Upload above two package (order doesn't matter)
curl -v -u admin:admin123 "http://localhost:8081/repository/helm-hosted/" -T node-11.4.13.tgz curl -v -u admin:admin123 "http://localhost:8081/repository/helm-hosted/" -T node-11.4.15.tgz
- Check the http://localhost:8081/repository/helm-hosted/index.yaml
EXPECTED BEHAVIOUR:
Newer version (11.4.15) should be the top of index.yaml.
ACTUAL BEHAVIOUR
Older version (11.4.13) shows in the top, so that when user try to install this "node", the default version is set to 11.4.13:
POTENTIAL CAUSE:
Currently, it seems the order is decided by the index set on the "asset" class in OrientDB, as Nexus does not sort in CreateIndexServiceImpl#buildIndexYaml, and just use the result of "select from asset where (component IS NOT NULL AND attributes.helm.asset_kind = 'HELM_PACKAGE') and (bucket=xxxx)" (no order specified)
Attachments
Issue Links
- relates
-
NEXUS-27722 non-SemVer2 appVersions in Helm Chart.yamls not handled
-
- New
-