-
Notifications
You must be signed in to change notification settings - Fork 403
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
Deleting a chart that has a version number in its name via the API causes no removal from index #220
Comments
@garnold54 thanks for opening. this may be a tough one to sort out. Do you mind elaborating on why you put the version in chart name vs just the version? |
We want to maintain different versions of our helm chart that correspond to different versions of our app. So for example we may release version 1.0 of our app. We have a helm chart for the app. In my example, the version of the helm chart is Hope that makes sense! |
@garnold54 i see what youre trying to do. I guess my only suggestion at this point is to use a different naming scheme without any number or period chars, such as "mychart" and "mychart-legacy". Unfortunately due to the naming convention of the tarballs this is pretty difficult to solve for all cases. If you absolutely need to do this, maybe you can take a look at the method that handles this and see if you can come up with a more elaborate solution: https://github.com/helm/chartmuseum/blob/master/pkg/repo/chart.go#L102 |
@garnold54 Bug already fixed,please see #268 |
|
I tried deleting a chart using the same |
Same happens to me, using 0.12 version |
Having the same issue here, my version is something like 1.0.0-rc1 |
This issue is happening for me with chart version like |
@piyush94 hihi , could you provide the whole command you delete your chart ? And It will be helpful if you can open the debug mode , and paste the log from chartmuseum . |
@scbizu I deleted the chart using API |
@piyush94 The DELETE method will not regenerate the index cache and only do delete the backend server chart (the .tgz file) but you can do the other BTW, you can open up the debug mode to see what was really happened with chartmuseum XD |
@scbizu This issue happens when there is a In the logs it says regenerating but entries are still there.
As you can see parsing is not correct here, |
@piyush94 Could you provide me your |
@kobynet could you check your Chart.yaml if the version is also the valid semver version (and the same as your chart filename) or not ? |
@scbizu our chart file consists of Our chart version in Chart.yaml is exactly the same as shown in chartmuseum, which is for example 1.0-SNAPSHOT+PR-102 |
@kobynet It seems that your example chart version is not the valid semver2 version (at least for the helm used semver2 Go package). See https://goplay.space/#vKdQ4mpQBQw |
@scbizu That is because you put in the version field, the whole chart including it's name, if you put only Just for the sake of solving this problem, i've also tried with "1.0.0-SNAPSHOT+PR-102" and got the same result, file was deleted, but index wasnt updated after GET requests. |
@kobynet Sorry for my bad reading , but I think I got the point , as #22 mentioned , the semver2 version like Then I look a little deeper into the codebase , and I find that the current solution with only filename but no content Chart.yaml do not actually support the even valid semver2 version like yours I will work on a PR these days and thanks for your detail report XD. (BTW , due to the diff between stored chart and cached chart , stored chart is deleted and cached chart is still there , then the stored chart content is empty , and the cached chart will be never deleted) |
@scbizu Thanks a lot for your comments and support! |
Is there any workaround? i can't get the chart deleted |
@guykanyvision It's a work-in-progress, see #362 |
Here is what I did:
|
@hoozecn thanks for sharing that. For users seeing this issue - you can disable index-cache.yaml with |
It seems that deleting a chart that has a version number in its name via the API does not delete the entry from the index. The package is deleted from the file system. Seems similar to #22
With a chart named
mychart
:With a chart named
mychart-1.0
Cheers,
Grant
The text was updated successfully, but these errors were encountered: