Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
⬆️ Follow-up to #2827 #3118
⚠️ Breaks API compatibility with previous OCI implementation (should be alright, as long as it merges before v0.11 is released)
This PR performs a couple of OCI refactors on-top of the ones already done in #3300:
Removes unnecessary caps - the feature only requires a single extra cap, instead of the 3 that were previously defined. Since the existence of the main OCI cap implied the existence of the other ones, we don't need to have the other ones, more caps should only be required as we increase the scope of the feature over time.
Removes the unnecessary SessionID attachment to the normal docker image resolver, since it's only relevant when loading from OCI stores in the OCI image resolver.
Refactors the store id out of the main image reference, and instead attaches the store id as a separate property. This prevent us from needing to do name mangling and de-mangling (preventing us from needing the
Hostname
call).Finally, since the reference then becomes completely irrelevant except for the digest portion, we can name it appropriately to ensure that we get reasonable error messages. Instead of using the store name as the basis for the dummy ref, we keep the original name, which allows the client to perform content store mappings as it desires - this pairs well with build: refactor reference parsing for oci image layouts docker/buildx#1456, which uses randomly generated identifiers as the store names.
Before:
After: