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

nydusify: fix pulling all platforms of source image #1146

Merged
merged 4 commits into from
Mar 15, 2023

Conversation

imeoer
Copy link
Collaborator

@imeoer imeoer commented Mar 10, 2023

nydusify: fix pulling all platforms of source image

We should only handle specific platform for pulling by
platforms.MatchComparer, otherwise nydusify will pull
the layer data of all platforms for an source image.

Fix #1142

nydusify: fix --oci option for convert subcommand

The --oci option is not working, we make it reverse before,
this patch fix it and keep compatibility with the old option
--docker-v2-format.

nydusify: forcibly enabled --oci option when --oci-ref be enabled

We need to forcibly enable --oci option for allowing to append
related annotation for zran image, otherwise an error be thrown:

merge nydus layers: invalid label containerd.io/snapshot/nydus-ref=: invalid checksum digest format

Related PR: containerd/nydus-snapshotter#408 goharbor/acceleration-service#115

@imeoer imeoer requested a review from a team as a code owner March 10, 2023 11:31
@imeoer imeoer requested review from jiangliu, changweige and hsiangkao and removed request for a team March 10, 2023 11:31
@imeoer imeoer force-pushed the nydusify-fix-pull branch 2 times, most recently from 24a6d1e to 8e4446c Compare March 15, 2023 02:09
We should only handle specific platform for pulling by
`platforms.MatchComparer`, otherwise nydusify will pull
the layer data of all platforms for an source image.

Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
The `--oci` option is not working, we make it reverse before,
this patch fix it and keep compatibility with the old option
`--docker-v2-format`.

Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
@imeoer imeoer changed the title [WIP] nydusify: fix multiple platforms handle nydusify: fix multiple platforms handle Mar 15, 2023
@imeoer imeoer changed the title nydusify: fix multiple platforms handle nydusify: fix pulling all platforms of source image Mar 15, 2023
@anolis-bot
Copy link
Collaborator

@imeoer , the title has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/56443

@anolis-bot
Copy link
Collaborator

@imeoer , the title has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/56444

@anolis-bot
Copy link
Collaborator

@imeoer , the title has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/56445

@anolis-bot
Copy link
Collaborator

@imeoer , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

```
golangci-lint run
Error: pkg/converter/provider/ported.go:47:64: SA1019: rCtx.ConvertSchema1 is deprecated: use Schema 2 or OCI images. (staticcheck)
	if desc.MediaType == images.MediaTypeDockerSchema1Manifest && rCtx.ConvertSchema1 {
	                                                              ^
Error: pkg/converter/provider/ported.go:20:2: SA1019: "github.com/containerd/containerd/remotes/docker/schema1" is deprecated: use images formatted in Docker Image Manifest v2, Schema 2, or OCI Image Spec v1. (staticcheck)
	"github.com/containerd/containerd/remotes/docker/schema1"
	^
```

Disabled the check, it's unnecessary to check the ported codes.

Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
@anolis-bot
Copy link
Collaborator

@imeoer , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/56459

@anolis-bot
Copy link
Collaborator

@imeoer , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

@imeoer , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

@imeoer , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

We need to forcibly enable `--oci` option for allowing to append
related annotation for zran image, otherwise an error be thrown:

```
merge nydus layers: invalid label containerd.io/snapshot/nydus-ref=: invalid checksum digest format
```

Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
@anolis-bot
Copy link
Collaborator

@imeoer , the title has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/56479

@anolis-bot
Copy link
Collaborator

@imeoer , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@jiangliu jiangliu merged commit eb042ca into dragonflyoss:master Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nydusify convert will download blobs for all platforms
4 participants