This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
Helm repository URL comparison logic does not ignore trailing slashes #303
Labels
bug
Something isn't working
Describe the bug:
When updating Helm chart dependencies, Fabrikate looks for existing repositories by comparing URLs using
strings.EqualFold
fabrikate/generators/helm.go
Line 472 in 19220cb
This means that trailing slashes are significant, so https://kubernetes-charts.storage.googleapis.com/ is treated as a different repository to https://kubernetes-charts.storage.googleapis.com
Helm does not treat these as different repositories since 2.0.1 (helm/helm#1603), its logic uses
filepath.Clean
to normalize URLs before comparison:https://github.com/helm/helm/blob/9b42702a4bced339ff424a78ad68dd6be6e1a80a/internal/urlutil/urlutil.go#L44-L64
The knock-on impact of this is that we get sporadic failures in
fab install
To Reproduce:
Install this component:
Expected behavior:
Fabrikate detects that the dependency uses the existing
stable
Helm repository, and does not add a new repository.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: