Generate index.yaml in chronological order for packages having same version
- Dominant language
- Go
- Stars
- 3.8k
- Forks
- 407
- PR merge metrics
- No merged PRs in 30d
Description
**Issue**
When chartmuseum generates index.yaml for charts of a specific package (lets say `mysql`), the order of each chart with same semantic version are not chronological in order. Charts with same version for a specific package e.g. `mysql` should be in chronological order in index.yaml so that we get latest chart of same semantic version
**Description**
consider the following, the charts of `server` all have same Public semantic version i.e. `1.2.0-dev9464` however since they are uploaded via CI, we append the build number to local version (after `+` symbol).
Ideally we would want to retrieve the latest as the one that has highest local build version which means it is the one most recently uploaded, even though public semantic version is unchanged.
So the `index.yaml` looks as following currently
```
server:
- apiVersion: v1
created: 2018-04-25T18:15:15Z
description: server (all workers)
digest: 19e3c6da5f2eb5fab74e1476ec2bf1461250461b0f5303f17e0f88f5bf7781cb
name: server
urls:
- charts/server-1.2.0-dev9464+1.f2b69e3.tgz
version: 1.2.0-dev9464+1.f2b69e3
- apiVersion: v1
created: 2018-04-26T16:09:41Z
description:server (all workers)
digest: 15953fbfb3d0c5a9f93b60e1d751842f328704eaeaa74a646245a9c2504eda4a
name: server
urls:
- charts/server-1.2.0-dev9464+2.80f44a3.tgz
version: 1.2.0-dev9464+2.80f44a3
- apiVersion: v1
created: 2018-04-18T17:11:34Z
description: server (all workers)
digest: 12fb3dfa897f7c48f5161373910e9c152e3f179a4dfb2acb1e8efd44058cf9f5
name: server
urls:
- charts/server-1.2.0-dev1+127.fe52a50.tgz
version: 1.2.0-dev1+127.fe52a50
```
when helm client stores that yaml as repository cache, it picks whatever the first package is in list as latest, so it shows `1.2.0-dev9464+1.f2b69e3` as latest. which is wrong, because `1.2.0-dev1+127.fe52a50.tgz` is one most recently uploaded (as seen from `created` field) .
**Proposed fix**
For charts of same semantic version , the order should be chronological so that helm client when reads the first package( thats most recently uploaded) as latest, which is correct behavior
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.