c8d/docker-py: Skip test_build_squash#46935
Conversation
build --squash is an experimental feature that is not implemented in the containerd image store. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
| # TODO re-enable test_run_container_reading_socket_ws. It's reported in https://github.com/docker/docker-py/issues/1478, and we're getting that error in our tests. | ||
| : "${PY_TEST_OPTIONS:=--junitxml=${DEST}/junit-report.xml --deselect=tests/integration/api_container_test.py::AttachContainerTest::test_attach_no_stream --deselect=tests/integration/api_container_test.py::AttachContainerTest::test_run_container_reading_socket_ws}" | ||
|
|
||
| # build --squash is not supported with containerd integration. |
There was a problem hiding this comment.
If there will be more exceptions, it may be good to have the comment include the actual test that was excluded (see comments at line 14, 15); it makes it easier to find back "which one" we're describing. (and where suitable, with a tracking ticket)
There was a problem hiding this comment.
In case we need more skips we can just add each --deselect as a separate line:
PY_TEST_OPTIONS="$PY_TEST_OPTIONS \
--deselect=tests/integration/api_build_test.py::BuildTest::test_build_squash \
--deselect=tests/integration/api_build_test.py::BuildTest::test_XYZ \
--deselect=tests/integration/api_build_test.py::BuildTest::test_ABC"I think the comment would only duplicate information that's already readable and explicit enough.
Let me know if you think otherwise, I'll add the comment.
|
This PR recalled me we need to bring up "squash" again with the Build team, as it's supported by BuildKit, but partially broken (not sure if it can be supported with the containerd integration, but we should have clear if this skip will be "permanent" or "temporary" (TODO)) |
|
IIUC, Buildkit deprecated the squash option: docker/buildx#810. $ printf 'FROM alpine\nRUN echo 1>/1\nRUN echo 2>/2' | DOCKER_BUILDKIT=1 docker build --squash -t asdf -q -
WARNING: experimental flag squash is removed with BuildKit. You should squash inside build using a multi-stage Dockerfile for efficiency.
sha256:a30f2ad43fab99673ba8284c49375cc8f4917aa94689883f533d7e1146fb8d10And the produced image will not be squashed: $ docker inspect asdf --format '{{.RootFS}}'
{layers [sha256:0faf9b67be60a76d473c955d4de2849da5e99e07fcefb753219631e1e7b608fb sha256:9d7b2619df6adc9b65977b549e25a21b784b795cd0880f2136a20b0561608707 sha256:d67a497fb42fd902dc0c2800bf4a19b061bdc6ec6dede093e2b712f054a6329c]}
$ docker inspect alpine --format '{{.RootFS}}'
{layers [sha256:0faf9b67be60a76d473c955d4de2849da5e99e07fcefb753219631e1e7b608fb]}
We could implement it for legacy builder, but considering that Buildkit renounced it... maybe we shouldn't. |
build --squash is an experimental feature that is not implemented in the 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)