remove some uses of trust-specific types#6512
Merged
austinvazquez merged 4 commits intodocker:masterfrom Sep 29, 2025
Merged
Conversation
The IndexInfo was only used to detect if the target was an official image, which we can deduct from the hostname. Adding some normalizing just in case (but we should only get "docker.io" here). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
c97216b to
f45dab0
Compare
This interface is used in tests to provide a dummy notary client, but none of the tests require any arguments, so let's remove them. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This function is a wrapper around apiClient.ImagePull; the use of trust.ImageRefAndAuth was out of convenience because it's also called when using content trust (through the trustedPull utility). Let's pull away the layers to separate it from trust code. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This function is a wrapper around apiClient.ImagePull and not directly related to docker content trust; it just happens to also be called when using content trust (through the trustedPull utility). Move it together with the `runPull` function to separate it from trust-related code. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
f45dab0 to
0dec83f
Compare
austinvazquez
approved these changes
Sep 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
cli/trust: Server: accept registry hostname
The IndexInfo was only used to detect if the target was an official
image, which we can deduct from the hostname. Adding some normalizing
just in case (but we should only get "docker.io" here).
cli/command/image: notaryClientProvider: don't require arguments
This interface is used in tests to provide a dummy notary client,
but none of the tests require any arguments, so let's remove them.
cli/command/image: imagePullPrivileged: don't use ImageRefAndAuth
This function is a wrapper around apiClient.ImagePull; the use of
trust.ImageRefAndAuth was out of convenience because it's also called
when using content trust (through the trustedPull utility).
Let's pull away the layers to separate it from trust code.
cli/command/image: imagePullPrivileged: move to non-trust file
This function is a wrapper around apiClient.ImagePull and not directly
related to docker content trust; it just happens to also be called
when using content trust (through the trustedPull utility).
Move it together with the
runPullfunction to separate it fromtrust-related code.