monocular icon indicating copy to clipboard operation
monocular copied to clipboard

Deal with duplicate digests from different repositories in chartsvc

Open prydonius opened this issue 6 years ago • 0 comments

Some chart repositories might contain duplicate charts that exist in other repositories. One example of this is the Bitnami charts repository, which syncs several charts from the Helm stable repository. In Monocular, when both repositories are added, multiple entries will be seen in the UI for the same charts (though listed as being from different repositories). This comes across as confusing, and I think a better UX would be to simply merge the entries, picking the first repository found.

We could make a change in the chartsvc listCharts handler: https://github.com/helm/monocular/blob/master/cmd/chartsvc/handler.go#L65 to filter the list of charts and remove charts where the latest version has a digest we have seen before.

One additional issue related to this is that the filtering of charts from specific repositories in the charts list happens client-side (https://github.com/helm/monocular/blob/master/frontend/src/app/charts/charts.component.ts#L87), so we would need to change this to actually request from the chartsvc endpoint for the repository (https://github.com/helm/monocular/blob/master/cmd/chartsvc/handler.go#L80) to ensure we don't miss out ignored charts in the full charts list response.

We should implement this in two steps, first changing the listCharts handler as described, and then updating the frontend to request charts by repo when set as a separate PR.

prydonius avatar Dec 05 '18 00:12 prydonius