Initial support for OCI multi-platform image#37346
Closed
arm64b wants to merge 1 commit intomoby:masterfrom
Closed
Initial support for OCI multi-platform image#37346arm64b wants to merge 1 commit intomoby:masterfrom
arm64b wants to merge 1 commit intomoby:masterfrom
Conversation
31c40ef to
701c111
Compare
Add the OCI spec compatible image support in client side. Signed-off-by: Dennis Chen <dennis.chen@arm.com>
701c111 to
de4231c
Compare
Contributor
Author
|
/cc @thaJeztah @johnstep, @dmcgowan @tianon, and @tonistiigi 😃 |
Contributor
Author
|
Will check the ci-failing tomorrow |
Member
|
Thanks! |
kolyshkin
requested changes
Jun 26, 2018
| p := system.ParsePlatform(apiPlatform) | ||
| if err := system.ValidatePlatform(p); err != nil { | ||
| return nil, errdefs.InvalidParameter(errors.Errorf("invalid platform: %s", err)) | ||
| if len(strings.TrimSpace(apiPlatform)) != 0 { |
Contributor
There was a problem hiding this comment.
Where is this (strings.TrimSpace()) coming from? It seems you are relaxing the spec here, allowing for non-empty strings containing some whitespace characters. Previous implementation (system.ParsePlatform()) did not do any special treatment of white space.
| platform = system.ParsePlatform(apiPlatform) | ||
| if err = system.ValidatePlatform(platform); err != nil { | ||
| err = fmt.Errorf("invalid platform: %s", err) | ||
| if len(strings.TrimSpace(apiPlatform)) != 0 { |
| if err := system.ValidatePlatform(system.ParsePlatform(imageOS)); err != nil { | ||
| return fmt.Errorf("cannot load %s image on %s: %s", imageOS, runtime.GOOS, err) | ||
| } | ||
| // TODO(@arm64b): Leave this sanity check to the containerd code in the future |
Contributor
There was a problem hiding this comment.
From the code it appears it's not longer a TODO item, so maybe just remove the comments about checking altogether?
Contributor
|
CI failures are caused by |
Contributor
Author
|
Hello @kolyshkin , thanks for the comments! I think we can close this PR since we have a replacement of PR #37350 by @tonistiigi 👍 |
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.
Add the OCI spec compatible image support in client side.
Signed-off-by: Dennis Chen dennis.chen@arm.com
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)