Skip to content

integration/c8d: Skip TestBuildSquashParent#46620

Merged
thaJeztah merged 1 commit intomoby:masterfrom
vvoland:c8d-test-ignore-squash
Oct 11, 2023
Merged

integration/c8d: Skip TestBuildSquashParent#46620
thaJeztah merged 1 commit intomoby:masterfrom
vvoland:c8d-test-ignore-squash

Conversation

@vvoland
Copy link
Copy Markdown
Contributor

@vvoland vvoland commented Oct 11, 2023

docker build --squash is an experimental feature which is not implemented for containerd image store.

- 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)

`docker build --squash` is an experimental feature which is not
implemented for containerd image store.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland added area/builder Build status/2-code-review area/testing containerd-integration Issues and PRs related to containerd integration labels Oct 11, 2023
@vvoland vvoland added this to the 25.0.0 milestone Oct 11, 2023
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

Not directly related to this test, but should we produce an error if someone sets the ?squash=true option and snapshotters are used?

@vvoland
Copy link
Copy Markdown
Contributor Author

vvoland commented Oct 11, 2023

We already produce an error in this case, although it's not very user friendly:

$ printf 'FROM busybox\nRUN echo 1 >/1' | DOCKER_BUILDKIT=0 docker build --squash - -t asdf
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            BuildKit is currently disabled; enable it by removing the DOCKER_BUILDKIT=0
            environment-variable.

Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM busybox
latest: Pulling from library/busybox
8a0af25e8c2e: Download complete
Digest: sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79
Status: Downloaded newer image for busybox:latest
 ---> 3fbc63216742
Step 2/2 : RUN echo 1 >/1
 ---> Running in 0d1c2a8a0502
 ---> Removed intermediate container 0d1c2a8a0502
 ---> a005264b2f80
error squashing image: not implemented

and buildkit issues a warning, even with the graphdrivers:

$ printf 'FROM busybox\nRUN echo 1 >/1' | DOCKER_BUILDKIT=1 docker build --squash - -t asdf
WARNING: experimental flag squash is removed with BuildKit. You should squash inside build using a multi-stage Dockerfile for efficiency.
[+] Building 2.2s (6/6) FINISHED                                                                                                                                                                                                                                                                              docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                    0.0s
 => => transferring dockerfile: 64B                                                                                                                                                                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/busybox:latest                                                                                                                                                                                                                                                       1.8s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                                                         0.0s
 => [1/2] FROM docker.io/library/busybox:latest@sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79                                                                                                                                                                                                 0.0s
 => => resolve docker.io/library/busybox:latest@sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79                                                                                                                                                                                                 0.0s
 => [2/2] RUN echo 1 >/1                                                                                                                                                                                                                                                                                                0.2s
 => exporting to image                                                                                                                                                                                                                                                                                                  0.1s
 => => exporting layers                                                                                                                                                                                                                                                                                                 0.0s
 => => exporting manifest sha256:a5a20d1e04112fb86588ab9ec684fb279f0d3d26d2924cb087ebda6db49bebf8                                                                                                                                                                                                                       0.0s
 => => exporting config sha256:b57304b25070d4fe09963bddd69c5e9f38c1b44a44c039d9b3eda31b5eea9a7f                                                                                                                                                                                                                         0.0s
 => => exporting attestation manifest sha256:dc44f1b60e84f7bbaf79ebc875cbff581038b98691883fb9d57c7a33906ae2dd                                                                                                                                                                                                           0.0s
 => => exporting manifest list sha256:3c256700ae53ffe4da0a0f2066f6b41ea8e467f77d41836d0a68184510e28288                                                                                                                                                                                                                  0.0s
 => => naming to docker.io/library/asdf:latest                                                                                                                                                                                                                                                                          0.0s
 => => unpacking to docker.io/library/asdf:latest                                                                                                                                                                                                                                                                       0.0s

@thaJeztah
Copy link
Copy Markdown
Member

Oh! Good call; we should probably move that error to the start (if possible), but I guess not a major issue for now

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

Labels

area/builder Build area/testing containerd-integration Issues and PRs related to containerd integration status/2-code-review

Projects

Development

Successfully merging this pull request may close these issues.

2 participants