tilt-extensions icon indicating copy to clipboard operation
tilt-extensions copied to clipboard

helm_remote fails with confusing error if repo already exists w/ different URL

Open landism opened this issue 2 years ago • 1 comments

Repro

Add a helm repo, e.g.: helm repo add postgresql https://cetic.github.io/helm-charts

In a Tiltfile, specify helm_remote with a repo with the same name and a different URL, e.g.:

load('ext://helm_remote', 'helm_remote')
helm_remote('postgresql', repo_url='https://charts.bitnami.com/bitnami')

Observed

local: helm repo add postgresql https://charts.bitnami.com/bitnami
Traceback (most recent call last):
  /private/tmp/helm_remote/Tiltfile:3:12: in <toplevel>
  /private/tmp/helm_remote/tilt_modules/helm_remote/Tiltfile:126:31: in helm_remote
  <builtin>: in local
Error: command "helm repo add postgresql https://charts.bitnami.com/bitnami" failed.
error: exit status 1
stdout: ""
stderr: "Error: repository name (postgresql) already exists, please specify a different name\n"

Expected

Either:

  1. things Just Work, or
  2. the log shows an error message describing went wrong and providing some steps to take

landism avatar Nov 09 '21 21:11 landism

In our case even just having a trailing slash is enough e.g. a user has foorepo added with url https://foo/ and the helm_remote is specified as https://foo -- this error is produced

chrisjohnson avatar Sep 21 '22 21:09 chrisjohnson