From dbc84789f21c7e028b45b6f853d80f37b2f723d2 Mon Sep 17 00:00:00 2001 From: Hyounggyu Choi Date: Thu, 23 May 2024 09:35:49 +0200 Subject: [PATCH] CI: Unpin requests pip package The issue https://github.com/docker/docker-py/issues/3113 seems to be resolved. The pinned version of requests (2.28.1) is no longer compatible with the current docker pip, resulting in errors like: "Error connecting: Error while fetching server API version: Not supported URL scheme http+docker" This commit allows pip to install requests according to its dependency tree. Fixes: #381 Signed-off-by: Hyounggyu Choi --- tests/e2e/ansible/start_docker_registry.yaml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/tests/e2e/ansible/start_docker_registry.yaml b/tests/e2e/ansible/start_docker_registry.yaml index fad63ac9..8fcd81f5 100644 --- a/tests/e2e/ansible/start_docker_registry.yaml +++ b/tests/e2e/ansible/start_docker_registry.yaml @@ -19,19 +19,13 @@ state: present retries: 3 delay: 10 - # The docker pip is needed by the docker_container ansible module itself. - - name: Install docker pip + # The docker and requests pip packages are required by the docker_container ansible module itself. + - name: Install docker and requests pip packages pip: - name: docker - # Due to a bug in requests 2.29.0 we need to downgrade it - # see https://github.com/docker/docker-py/issues/3113 - - name: Downgrade requests - shell: | - actual_version="$(pip3 show requests | grep Version | cut -d: -f2 | xargs)" - version_ge="$(echo -e "2.29.0\n$actual_version" | sort -V | head -1)" - if [ "$version_ge" = "2.29.0" ]; then - pip3 install requests==2.28.1 - fi + name: + - docker + - requests<2.32 + state: present retries: 3 delay: 10 - name: Start a docker registry