-
Notifications
You must be signed in to change notification settings - Fork 114
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
Bump up containerd to the latest #523
Conversation
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
@@ -109,3 +116,43 @@ func ManifestDesc(ctx context.Context, provider content.Provider, image ocispec. | |||
} | |||
return m[0], nil | |||
} | |||
|
|||
// Forked from github.com/containerd/containerd/images/image.go |
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.
specify the hash or tag
// ValidateMediaType returns an error if the byte slice is invalid JSON or if | ||
// the media type identifies the blob as one format but it contains elements of | ||
// another format. | ||
func ValidateMediaType(b []byte, mt string) error { |
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.
Can we just update containerd to expose https://github.com/containerd/containerd/blob/a776a27af54a803657d002e7574a4425b3949f56/images/image.go#L401 as a public function?
Can be a follow-up PR.
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.
Opened PR containerd/containerd#6266
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.
Can be a follow-up PR.
👍 to this, though it'd be worth opening an issue to track it.
@@ -109,3 +116,43 @@ func ManifestDesc(ctx context.Context, provider content.Provider, image ocispec. | |||
} | |||
return m[0], nil | |||
} | |||
|
|||
// Forked from github.com/containerd/containerd/images/image.go |
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.
Is it worth exposing the original implementation rather than copying? This logic covers the known cases of OCI indices, OCI manifests, Docker manifest lists, Docker schema 2 manifests, and Docker schema 1 manifests, but may have to change in the future if new types are introduced.
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.
Opened PR containerd/containerd#6266
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
c959396
to
e1b5341
Compare
See containerd/containerd@a776a27
Also fixes codes relaeted to mediatype detection to make it stricter.