-
Notifications
You must be signed in to change notification settings - Fork 6
Add changes required for Gcmarker #58
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,6 +72,24 @@ func (ms *manifestStore) Exists(ctx context.Context, dgst digest.Digest) (bool, | |
| return true, nil | ||
| } | ||
|
|
||
| func (ms *manifestStore) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error) { | ||
| dcontext.GetLogger(ms.ctx).Debug("(*manifestStore).Exists") | ||
|
|
||
| descriptor, err := ms.blobStore.Stat(ctx, dgst) | ||
| if err != nil { | ||
| if err == distribution.ErrBlobUnknown { | ||
| return distribution.Descriptor{}, distribution.ErrManifestUnknownRevision{ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add err too to have the stack trace on what happened.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we want stack trace, we can add it to data plane code instead of the distribution fork. Better to keep this fork lean and minimal diff with respect to open source's distribution. |
||
| Name: ms.repository.Named().Name(), | ||
| Revision: dgst, | ||
| } | ||
| } | ||
|
|
||
| return distribution.Descriptor{}, err | ||
| } | ||
|
|
||
| return descriptor, nil | ||
| } | ||
|
|
||
| func (ms *manifestStore) Get(ctx context.Context, dgst digest.Digest, options ...distribution.ManifestServiceOption) (distribution.Manifest, error) { | ||
| dcontext.GetLogger(ms.ctx).Debug("(*manifestStore).Get") | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
i think we can have stat method in our dataplane code instead of distribution repo.
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.
We can but I thought this would be an apt place to be since all other types have a Stat method but for some reason ManifestService does not.