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

Bump up containerd to the latest #523

Merged
merged 2 commits into from Nov 18, 2021
Merged

Conversation

ktock
Copy link
Member

@ktock ktock commented Nov 18, 2021

See containerd/containerd@a776a27

Also fixes codes relaeted to mediatype detection to make it stricter.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
@ktock ktock changed the title Containerd latest Bump up containerd to the latest Nov 18, 2021
@@ -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
Copy link
Member

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 {
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

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
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

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

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
@ktock ktock merged commit 1885584 into containerd:main Nov 18, 2021
@ktock ktock deleted the containerd-latest branch November 22, 2021 00:47
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

3 participants