Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ignore-already-exists flag to ignore chartmuseum's "already exists" error #91

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexandrevilain
Copy link

Fixes #90

This PR adds the --ignore-already-exists to make helm-push ignore the chartmuseum's "already exists" error

Without the flag:

$ helm push mychart/ chartmuseum
Pushing mychart-0.1.0.tgz to chartmuseum...
Error: 409: mychart-0.1.0.tgz already exists
Usage:
  helm push [flags]
[...]

With the flag:

$ helm push mychart/ chartmuseum --ignore-already-exists
Pushing mychart-0.1.0.tgz to chartmuseum...
Got the following error: 409: mychart-0.1.0.tgz already exists
Skipping.

@karuppiah7890
Copy link
Contributor

I had an alternate idea (or extra step) too for this - instead of uploading the chart and letting server throw the error, first use HEAD request and get chart digest. This feature is not present in the server now. But after we get the digest, we can check the digest of the locally present chart and then if it's the same, mention that it's the same and not push it. But if it's not, we can push it with the client config (force etc) and let the server take care of it based on the config in the server (overwrite allowed etc).

Difference between the current implementation and the alternative is

  • We have an extra step in this case. So, maybe not exactly an alternative, more like an extra step I guess
  • We reduce network usage - uploading the chart, in case it's the exact same chart present in the server. But yeah, the network usage won't be that high, given it's all text content inside a tar ball. But still, this is one advantage
  • One disadvantage is, we do an extra step / processing of calculating digest, instead of letting the server do all the work of checking if the chart already exists (no matter the content)

@BryanStenson-okta
Copy link
Contributor

any plans on merging this?

@chathumal-nad
Copy link

Hi, can you guys merge this 😃 We are so eager to use this feature because we are currently using bash scripts to avoid these errors.

@pcperera
Copy link

pcperera commented Feb 6, 2023

@alexandrevilain appreciate if this can be merged.

@bobacarOrpheo
Copy link

Hello,

Eager to have this feature too, anyone can look at it with some luck? @alexandrevilain @pcperera

Or maybe @chathumal-nad can you share your workaround?

Thank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an option to skip the already exists error
6 participants