Add digestset subpackage#55
Merged
Merged
Conversation
Set represents a unique set of digests which allow for efficient lookup. Dumping short codes is a function which takes in a digest set. Any operation involving short codes may be considered secure if the list of digests added to the set is the complete list of referenceable digests. Contains benchmarks for Add, Lookup, and Dump. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
To make the definition of supported digests more clear, we have refactored the digest package to have a special Algorithm type. This represents the digest's prefix and we associated various supported hash implementations through function calls. Signed-off-by: Stephen J Day <stephen.day@docker.com>
Add mutex protection around set access Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Correct spelling of words in source code comments. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Signed-off-by: Stephen J Day <stephen.day@docker.com>
1. when lookup an entry which is missing, it should say NotFound. 2. when add duplicated entry, the entries size should be increased. 3. when add entry which has different algorithm, it should be allowed. Signed-off-by: zhouhaibing089 <zhouhaibing089@gmail.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Signed-off-by: Derek McGowan <derek@mcg.dev>
Member
|
LGTM |
Member
|
Thanks! Looks like after this is merged, we need to do one more vendor round (containerd/cri and back) |
Member
Author
|
I propose we tag 1.0 after getting this merged in. Then vendoring changes can use the tag. |
|
+1 from me for the 1.0 tag that makes modules behave a little better. |
stevvooe
approved these changes
May 11, 2020
Contributor
stevvooe
left a comment
There was a problem hiding this comment.
LGTM
This package has a history of being solid. I think the only reason we left it out from the original go-digest project creation was that it was relatively new.
Contributor
|
Looks like I've been removed from @opencontainers/go-digest-maintainers for some reason, so its not tracking my LGTM. |
Contributor
|
added @stevvooe back and resync'd PullApprove, his next LGTM should be picked up |
AkihiroSuda
approved these changes
May 11, 2020
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.
Adds digestset from https://github.com/docker/distribution/tree/master/digestset
Originally the digest set was a part of the
digestpackage, but was split out to make thego-digestpackage smaller when it moved fromdocker/distributionto here. This package has remained stable and used in situations when a "short" digest needs to be resolved securely and unambiguously. This package is useful alongsidego-digestbut can be safely broken out into a separate package, without bloating importers who do not intend to use it.This is helpful to address some
docker/distributionvendoring issues for importers who only need this package (such ascontainerd/containerd).