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

[FEATURE] Don't make registry calls when content has completed fetching #1116

Closed
sondavidb opened this issue Mar 15, 2024 · 2 comments · Fixed by #1147
Closed

[FEATURE] Don't make registry calls when content has completed fetching #1116

sondavidb opened this issue Mar 15, 2024 · 2 comments · Fixed by #1147
Labels
feature New feature or request

Comments

@sondavidb
Copy link
Contributor

Description

SOCI doesn't use any sort of credential rotation system, so in systems such as Kubernetes, we can encounter issues where a user can attempt to run tasks after the credential has expired. stargz gets around this by only calling the registry if the fetched size is under the expected layer size: containerd/stargz-snapshotter#1584. We can do the same here.

Ultimately, this is a workaround, and we need a better credentials mechanism, but this should be a simple fix that should help for now.

Describe the solution you'd like

No response

Describe any alternative solutions/features you've considered

No response

Any additional context or information about the feature request

There's a separate issue here which is that we don't know exactly when the background fetcher has concluded fetching all of its data. I think if we can implement that, this fix can be a bit cleaner.

@sondavidb sondavidb added the feature New feature or request label Mar 15, 2024
@sondavidb sondavidb changed the title [FEATURE] Don't make registry calls when content is fetched [FEATURE] Don't make registry calls when content has completed fetching Mar 15, 2024
@austinvazquez
Copy link
Contributor

Does this mean we are not checking the cache before going to the registry? If so, what is the point of the cache?

@sondavidb
Copy link
Contributor Author

Does this mean we are not checking the cache before going to the registry? If so, what is the point of the cache?

AFAIK, before this change, the cache still did its function, but the call order meant that we still made a registry call regardless. The cache is to stop us from fetching data we don't already have, and it seems to do its job

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

Successfully merging a pull request may close this issue.

2 participants