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

fix(digests): do not mandate sha256 as the only algorithm used for hashing blobs #2075

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andaaron
Copy link
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Attention: Patch coverage is 87.69231% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 92.88%. Comparing base (be5ad66) to head (52dc22b).

Files Patch % Lines
pkg/storage/imagestore/imagestore.go 87.75% 4 Missing and 2 partials ⚠️
pkg/storage/gc/gc.go 20.00% 4 Missing ⚠️
pkg/storage/common/common.go 90.47% 2 Missing ⚠️
pkg/test/image-utils/images.go 92.00% 1 Missing and 1 partial ⚠️
pkg/test/image-utils/multiarch.go 86.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2075      +/-   ##
==========================================
+ Coverage   92.86%   92.88%   +0.02%     
==========================================
  Files         167      167              
  Lines       22077    22128      +51     
==========================================
+ Hits        20502    20554      +52     
+ Misses        982      980       -2     
- Partials      593      594       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andaaron andaaron marked this pull request as ready for review November 28, 2023 22:19
@andaaron andaaron self-assigned this Nov 28, 2023
@andaaron
Copy link
Contributor Author

See also opencontainers/distribution-spec#494

peusebiu
peusebiu previously approved these changes Dec 4, 2023
Copy link
Collaborator

@peusebiu peusebiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

…shing blobs

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
@ktarplee
Copy link

  • @andaaron What else is needed on this PR? What you have looks good however I did not see the REST API changes. I expected there to be some changes necessary there.

@andaaron
Copy link
Contributor Author

  • @andaaron What else is needed on this PR? What you have looks good however I did not see the REST API changes. I expected there to be some changes necessary there.

We need the spec for specifying a non-canonical digest algorithm for the manifest in case of pushing by tag.
Once we have the spec we can implement that.

Otherwise this PR should be good for the blobs use case. But I don't know if there's any case in which the blobs use non-canonical digest algorithms while the manifest uses the canonical (sha256) digest algorithm.

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

Successfully merging this pull request may close these issues.

None yet

4 participants