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

Public registry proxy not getting the latest Chart versions anymore? #3

Closed
PoliM opened this issue Sep 1, 2023 · 4 comments · Fixed by #4
Closed

Public registry proxy not getting the latest Chart versions anymore? #3

PoliM opened this issue Sep 1, 2023 · 4 comments · Fixed by #4
Assignees
Labels
bug Something isn't working

Comments

@PoliM
Copy link

PoliM commented Sep 1, 2023

Hello everybody

Thanks for the proxy - great idea :-) I was using the public registry proxy and just wanted to update an Argo CD deployment when I found, that the registry does not have the latest Charts available (I know this might not be the right place to ask, but I didn't see another way to get in touch with you - sorry about that).

When I do helm fetch oci://chartproxy.container-registry.com/argoproj.github.io/argo-helm/argo-cd it downloads the version 5.42.1 even though the latest is 5.45.0
So I tried helm fetch oci://chartproxy.container-registry.com/argoproj.github.io/argo-helm/argo-cd --version 5.45.0 and it returns "Error: chartproxy.container-registry.com/argoproj.github.io/argo-helm/argo-cd:5.45.0: not found".

I checked the tag list here https://chartproxy.container-registry.com/v2/argoproj.github.io/argo-helm/argo-cd/tags/list and it is not listed.

Maybe you could give it a nudge? Anyway, thanks again for the service.

@Vad1mo
Copy link
Contributor

Vad1mo commented Sep 1, 2023

I restarted the service. and that latest indey.yaml is now fetched.
We do cache the upstream index.yaml file, but it seems there is a timing issue, or that a new index.yaml file is fetched on a 404.

This seems to be a bug to me.

maybe @tpoxa can look into that.

@PoliM
Copy link
Author

PoliM commented Sep 1, 2023

Wow, that was quick, thanks a lot :-)

@jonasrutishauser
Copy link

It seems that it is out of date again.

@PoliM
Copy link
Author

PoliM commented Sep 20, 2023

I was looking through the code and it seems that the index.yaml gets cached for a very very long time.

res.c, res.err = m.download(url)
if res.err != nil {
m.indexCache.SetWithTTL(url, res, 10, time.Second*5)
} else {
m.indexCache.Set(url, res, 10)
}

I'm not a 100% sure but I think this is what happens: the total cache cost is set to 100 million (somewhere in serve.go) and each index.yaml costs 10. So, unless we fetch a 10 million different registries nothing will get thrown out because in the success case there is no TTL.

There is no info about contributing (or I haven't found it), so this is just for your information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants