From 2262f18df97e4bb4240bdc6d468b9ac7ff09dc3e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Aug 2023 17:29:49 +0200 Subject: [PATCH 1/7] test-docker-py: remove comment about docker 17.06 limitations Our dev-container now has buildx installed, so we're no longer limited to 17.06. Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 79a0f82ca1898b62cd4791bf0991ab04d68a8927) Signed-off-by: Sebastiaan van Stijn --- hack/make/test-docker-py | 3 --- 1 file changed, 3 deletions(-) diff --git a/hack/make/test-docker-py b/hack/make/test-docker-py index 2a5878d57c..ad69ec85a4 100644 --- a/hack/make/test-docker-py +++ b/hack/make/test-docker-py @@ -4,9 +4,6 @@ set -e source hack/make/.integration-test-helpers # The commit or tag to use for testing -# TODO docker 17.06 cli client used in CI fails to build using a sha; -# unable to prepare context: unable to 'git clone' to temporary context directory: error fetching: error: no such remote ref ead0bb9e08c13dd3d1712759491eee06bf5a5602 -#: exit status 128 : "${DOCKER_PY_COMMIT:=5.0.3}" # The version (and variant) of the python image to use for the tests; From e7c3374177fda8afca24611dfbda258c0b9882c3 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 19 Aug 2022 20:27:52 +0200 Subject: [PATCH 2/7] testing: update docker-py 6.0.1 release notes: https://github.com/docker/docker-py/releases/tag/6.0.1 full diff: https://github.com/docker/docker-py/compare/5.0.3...6.0.1 Signed-off-by: Sebastiaan van Stijn (cherry picked from commit e0f171f34265ad784b28600c00a352ab91f7e0cf) Signed-off-by: Sebastiaan van Stijn --- hack/make/test-docker-py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hack/make/test-docker-py b/hack/make/test-docker-py index ad69ec85a4..6c1f3424c4 100644 --- a/hack/make/test-docker-py +++ b/hack/make/test-docker-py @@ -4,7 +4,7 @@ set -e source hack/make/.integration-test-helpers # The commit or tag to use for testing -: "${DOCKER_PY_COMMIT:=5.0.3}" +: "${DOCKER_PY_COMMIT:=6.0.1}" # The version (and variant) of the python image to use for the tests; # see https://github.com/docker/docker-py/blob/5.0.3/tests/Dockerfile#L1C5-L3 @@ -18,9 +18,7 @@ source hack/make/.integration-test-helpers # flag) until they are fixed upstream. For example: # --deselect=tests/integration/api_container_test.py::AttachContainerTest::test_attach_no_stream # TODO re-enable test_attach_no_stream after https://github.com/docker/docker-py/issues/2513 is resolved -# TODO re-enable test_create_with_device_cgroup_rules after https://github.com/docker/docker-py/issues/2939 is resolved -# TODO re-enable test_prune_volumes after https://github.com/docker/docker-py/pull/3051 is resolved -: "${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::CreateContainerTest::test_create_with_device_cgroup_rules --deselect=tests/integration/api_volume_test.py::TestVolumes::test_prune_volumes}" +: "${PY_TEST_OPTIONS:=--junitxml=${DEST}/junit-report.xml --deselect=tests/integration/api_container_test.py::AttachContainerTest::test_attach_no_stream}" ( bundle .integration-daemon-start From 31c1dbc3202dd8c1fbaf0cef364fc4914d91cb78 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Aug 2023 17:28:31 +0200 Subject: [PATCH 3/7] test-docker-py: skip AttachContainerTest::test_run_container_reading_socket_ws Tests are failing with this error: E ValueError: scheme http+docker is invalid Which is reported in docker-py in https://github.com/docker/docker-py/issues/1478. Not sure what changed in the tests, but could be due to updated Python version or dependencies, but let's skip it for now. Test failure: ___________ AttachContainerTest.test_run_container_reading_socket_ws ___________ tests/integration/api_container_test.py:1245: in test_run_container_reading_socket_ws pty_stdout = self.client.attach_socket(container, opts, ws=True) docker/utils/decorators.py:19: in wrapped return f(self, resource_id, *args, **kwargs) docker/api/container.py:98: in attach_socket return self._attach_websocket(container, params) docker/utils/decorators.py:19: in wrapped return f(self, resource_id, *args, **kwargs) docker/api/client.py:312: in _attach_websocket return self._create_websocket_connection(full_url) docker/api/client.py:315: in _create_websocket_connection return websocket.create_connection(url) /usr/local/lib/python3.7/site-packages/websocket/_core.py:601: in create_connection websock.connect(url, **options) /usr/local/lib/python3.7/site-packages/websocket/_core.py:245: in connect options.pop('socket', None)) /usr/local/lib/python3.7/site-packages/websocket/_http.py:117: in connect hostname, port, resource, is_secure = parse_url(url) /usr/local/lib/python3.7/site-packages/websocket/_url.py:62: in parse_url raise ValueError("scheme %s is invalid" % scheme) E ValueError: scheme http+docker is invalid ------- generated xml file: /src/bundles/test-docker-py/junit-report.xml ------- Signed-off-by: Sebastiaan van Stijn (cherry picked from commit f6959bc597d07657bc2fbecc4607d2fa7ef099cb) Signed-off-by: Sebastiaan van Stijn --- hack/make/test-docker-py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hack/make/test-docker-py b/hack/make/test-docker-py index 6c1f3424c4..24db77931c 100644 --- a/hack/make/test-docker-py +++ b/hack/make/test-docker-py @@ -18,7 +18,8 @@ source hack/make/.integration-test-helpers # flag) until they are fixed upstream. For example: # --deselect=tests/integration/api_container_test.py::AttachContainerTest::test_attach_no_stream # TODO re-enable test_attach_no_stream after https://github.com/docker/docker-py/issues/2513 is resolved -: "${PY_TEST_OPTIONS:=--junitxml=${DEST}/junit-report.xml --deselect=tests/integration/api_container_test.py::AttachContainerTest::test_attach_no_stream}" +# 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}" ( bundle .integration-daemon-start From 9322bca5da1d9ba8d012eff3ebe651b12934152b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 20 Jun 2023 09:42:43 +0200 Subject: [PATCH 4/7] testing: update docker-py 6.1.3 full diff: https://github.com/docker/docker-py/compare/6.0.1...6.1.3 Signed-off-by: Sebastiaan van Stijn (cherry picked from commit a9a0ffaf518bc9c1bd3b03d0dd81f126d52a0838) Signed-off-by: Sebastiaan van Stijn --- hack/make/test-docker-py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/make/test-docker-py b/hack/make/test-docker-py index 24db77931c..7813fa2c08 100644 --- a/hack/make/test-docker-py +++ b/hack/make/test-docker-py @@ -4,7 +4,7 @@ set -e source hack/make/.integration-test-helpers # The commit or tag to use for testing -: "${DOCKER_PY_COMMIT:=6.0.1}" +: "${DOCKER_PY_COMMIT:=6.1.3}" # The version (and variant) of the python image to use for the tests; # see https://github.com/docker/docker-py/blob/5.0.3/tests/Dockerfile#L1C5-L3 From 77127f73e80e1358bcd93a520594850d1376693b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Aug 2023 18:39:52 +0200 Subject: [PATCH 5/7] testing: update docker-py to 7.0.0b1 https://github.com/docker/docker-py/compare/6.1.3...7.0.0b1 Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 4394c61e6c66bd7ad7ca85838a3019bbe730ede9) Signed-off-by: Sebastiaan van Stijn --- hack/make/test-docker-py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/make/test-docker-py b/hack/make/test-docker-py index 7813fa2c08..119947ac17 100644 --- a/hack/make/test-docker-py +++ b/hack/make/test-docker-py @@ -4,7 +4,7 @@ set -e source hack/make/.integration-test-helpers # The commit or tag to use for testing -: "${DOCKER_PY_COMMIT:=6.1.3}" +: "${DOCKER_PY_COMMIT:=7.0.0b1}" # The version (and variant) of the python image to use for the tests; # see https://github.com/docker/docker-py/blob/5.0.3/tests/Dockerfile#L1C5-L3 From 4b404144d2e5365b09f310384b31c4f6e5bb0fde Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 12 Sep 2023 11:07:26 +0200 Subject: [PATCH 6/7] Revert "testing: temporarily pin docker-py tests to use "bullseye"" This reverts commit 19d860fa9dd25f09cca979830d3a4ccaeb680529. Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 7786f8512bb0f0ad8689a65758bcfce8bd8a5ce9) Signed-off-by: Sebastiaan van Stijn --- hack/make/test-docker-py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hack/make/test-docker-py b/hack/make/test-docker-py index 119947ac17..f28cfc1ceb 100644 --- a/hack/make/test-docker-py +++ b/hack/make/test-docker-py @@ -6,12 +6,6 @@ source hack/make/.integration-test-helpers # The commit or tag to use for testing : "${DOCKER_PY_COMMIT:=7.0.0b1}" -# The version (and variant) of the python image to use for the tests; -# see https://github.com/docker/docker-py/blob/5.0.3/tests/Dockerfile#L1C5-L3 -# -# TODO remove once https://github.com/docker/docker-py/pull/3145 is merged. -: "${PYTHON_VERSION:=3.7-bullseye}" - # custom options to pass py.test # # This option can be used to temporarily skip flaky tests (using the `--deselect` @@ -52,7 +46,7 @@ source hack/make/.integration-test-helpers [ -z "${TESTDEBUG}" ] && build_opts="--quiet" [ -f /.dockerenv ] || build_opts="${build_opts} --network=host" # shellcheck disable=SC2086 - exec docker build ${build_opts} --build-arg PYTHON_VERSION="${PYTHON_VERSION}" -t "${docker_py_image}" -f tests/Dockerfile "https://github.com/docker/docker-py.git#${DOCKER_PY_COMMIT}" + exec docker build ${build_opts} -t "${docker_py_image}" -f tests/Dockerfile "https://github.com/docker/docker-py.git#${DOCKER_PY_COMMIT}" ) fi From 73f189766e37447e8446d72a7762d5397a7f80bb Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 9 Dec 2023 01:36:38 +0100 Subject: [PATCH 7/7] testing: update docker-py to 7.0.0 full diff: https://github.com/docker/docker-py/compare/7.0.0b1...7.0.0 Signed-off-by: Sebastiaan van Stijn (cherry picked from commit b524ed2dda6539dd746aa807a5bfa995d3a7857e) Signed-off-by: Sebastiaan van Stijn --- hack/make/test-docker-py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/make/test-docker-py b/hack/make/test-docker-py index f28cfc1ceb..12a640e661 100644 --- a/hack/make/test-docker-py +++ b/hack/make/test-docker-py @@ -4,7 +4,7 @@ set -e source hack/make/.integration-test-helpers # The commit or tag to use for testing -: "${DOCKER_PY_COMMIT:=7.0.0b1}" +: "${DOCKER_PY_COMMIT:=7.0.0}" # custom options to pass py.test #