Skip to content

test: register docker worker with containerd snapshotter - #1897

Merged
crazy-max merged 4 commits into
docker:masterfrom
crazy-max:test-containerd-snap
Jun 20, 2023
Merged

test: register docker worker with containerd snapshotter#1897
crazy-max merged 4 commits into
docker:masterfrom
crazy-max:test-containerd-snap

Conversation

@crazy-max

Copy link
Copy Markdown
Member

follow-up #1886 (comment)

Adds docker+containerd worker to our matrix to be able to test against dockerd with containerd storage enabled.

Comment threadtests/build.go
cmd := buildxCmd(
sb,
withArgs("build", "-q", outFlag, "--iidfile", filepath.Join(targetDir, "iid.txt"), "--metadata-file", filepath.Join(targetDir, "md.json"), dir),
withArgs("build", "-q", "--provenance", "false", outFlag, "--iidfile", filepath.Join(targetDir, "iid.txt"), "--metadata-file", filepath.Join(targetDir, "md.json"), dir),

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

@tonistiigi Needs to disable provenance for this test with containerd storage as it would export an OCI image:

{
"containerimage.buildinfo": {
"frontend": "dockerfile.v0",
"attrs": {
"filename": "Dockerfile"
},
"sources": [
{
"type": "docker-image",
"ref": "docker.io/library/busybox:latest",
"pin": "sha256:0d5a701f0ca53f38723108687add000e1922f812d4187dea7feaee85d2f5a6c5"
}
]
},
"containerimage.descriptor": {
"mediaType": "application/vnd.oci.image.index.v1+json",
"digest": "sha256:ce51e4ac359feabf7a34388bb599e84873ba9299ce8b863ead9a093a16ffc875",
"size": 855
},
"containerimage.digest": "sha256:ce51e4ac359feabf7a34388bb599e84873ba9299ce8b863ead9a093a16ffc875",
"image.name": "moby-dangling@sha256:ce51e4ac359feabf7a34388bb599e84873ba9299ce8b863ead9a093a16ffc875"
}

This is a test case we can add in follow-up. I guess we need to read "containerimage.descriptor".annotations."config.digest".

Comment threadtests/inspect.go Outdated
Comment threadtests/workers/docker.go Outdated
@crazy-max

crazy-max commented Jun 20, 2023

Copy link
Copy Markdown
MemberAuthor

Hum no tests run with docker+containerd. Might be related to the + char. I'm looking at it:

=== RUN TestIntegration
time="2023-06-20T13:49:51Z" level=info msg="trying next host - response was http.StatusNotFound" host="localhost:32933"
run.go:266: copied docker.io/amd64/busybox:latest@sha256:0d5a701f0ca53f38723108687add000e1922f812d4187dea7feaee85d2f5a6c5 to local mirror localhost:32933/library/busybox:latest
time="2023-06-20T13:49:51Z" level=info msg="trying next host - response was http.StatusNotFound" host="localhost:32933"
run.go:266: copied docker.io/amd64/alpine:latest@sha256:c0d488a800e4127c334ad20d61d7bc21b4097540327217dfab52262adc02380c to local mirror localhost:32933/library/alpine:latest
time="2023-06-20T13:49:51Z" level=info msg="trying next host - response was http.StatusNotFound" host="localhost:32933"
run.go:266: copied docker.io/moby/buildkit:buildx-stable-1 to local mirror localhost:32933/moby/buildkit:buildx-stable-1
--- PASS: TestIntegration (3.83s)
testing: warning: no tests to run

@crazy-max
crazy-maxforce-pushed the test-containerd-snap branch from 90c0bff to 4778fbfCompareJune 20, 2023 14:20
@crazy-max
crazy-maxforce-pushed the test-containerd-snap branch from 4778fbf to 1f308afCompareJune 20, 2023 14:49
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max
crazy-maxforce-pushed the test-containerd-snap branch from 1f308af to 155eb3aCompareJune 20, 2023 14:56
@crazy-max

Copy link
Copy Markdown
MemberAuthor

Hum no tests run with docker+containerd. Might be related to the + char. I'm looking at it:

=== RUN TestIntegration
time="2023-06-20T13:49:51Z" level=info msg="trying next host - response was http.StatusNotFound" host="localhost:32933"
run.go:266: copied docker.io/amd64/busybox:latest@sha256:0d5a701f0ca53f38723108687add000e1922f812d4187dea7feaee85d2f5a6c5 to local mirror localhost:32933/library/busybox:latest
time="2023-06-20T13:49:51Z" level=info msg="trying next host - response was http.StatusNotFound" host="localhost:32933"
run.go:266: copied docker.io/amd64/alpine:latest@sha256:c0d488a800e4127c334ad20d61d7bc21b4097540327217dfab52262adc02380c to local mirror localhost:32933/library/alpine:latest
time="2023-06-20T13:49:51Z" level=info msg="trying next host - response was http.StatusNotFound" host="localhost:32933"
run.go:266: copied docker.io/moby/buildkit:buildx-stable-1 to local mirror localhost:32933/moby/buildkit:buildx-stable-1
--- PASS: TestIntegration (3.83s)
testing: warning: no tests to run

So it's fine with go test but not with gotestsum so needs to escape this char. Will take a closer look as it might be a bug with gotestsum imo.

crazy-maxand others added 3 commits June 20, 2023 17:04
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max
crazy-maxforce-pushed the test-containerd-snap branch from 155eb3a to 28a1eb3CompareJune 20, 2023 15:04
@crazy-max
crazy-max merged commit b3a4f95 into docker:masterJun 20, 2023
@crazy-max
crazy-max deleted the test-containerd-snap branch June 20, 2023 22:11
@jedevcjedevc mentioned this pull request Jul 5, 2023
35 tasks
Comment threadDockerfile
ARG TARGETPLATFORM
ARG DOCKER_VERSION
WORKDIR /opt/docker
RUN DOCKER_ARCH=$(case ${TARGETPLATFORM:-linux/amd64} in \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can't you do this with xx-info march ?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

🤦‍♂️

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@crazy-max@tonistiigi@jedevc