-
Notifications
You must be signed in to change notification settings - Fork 181
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
cache docker types too #227
Conversation
This is the last of the 3 (I think) PRs to handle the caching issue, discussed with @jdolitsky. We had discussed whether or not we should be adding the legacy docker types, in addition to the OCI types, to the list of types to be cached. This PR assumes they should. You had suggested at one point to make the OCI types be the default, and have an option to override the types to be cached. I am ok with that, in principle, but it creates some unanswered questions: append vs replaceShould the option append types, or replace them? I think replace is just simpler, especially if we make the default types available via a function that where to pass the optionThe bigger issue is where to pass this option? It only is relevant to newHybridStoreFromIngester, which currently does not have options, although we can add them. But The only exposed place is Pull. We could pass an option there, but that seems distant from what it is dealing with. To have an option to modify how the deep down cache behaves when calling Pull seems a bit disjoint. Then again, we have an option WithContentProvideIngester, so perhaps it is fine? I see three options:
My obvious personal preference is just this PR. It is by far the simplest (2-line change). Josh, thoughts? |
@deitch - option 2 is still my preference. This enables oras to be fully agnostic to mediatypes |
You would want the harder one, wouldn't you? Let's see what we can do. |
Signed-off-by: Avi Deitcher <[email protected]>
@jdolitsky take a look at it now. See if this works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks great
I was waiting for you to merge, then realized, wait a sec, I don't need to. I can do it once you approved (which you did) 😃 |
Fixes #226
But worth awaiting the result of #225 before merging in to see any impact.