Skip to content

Commit

Permalink
tests/e2e: downgrade requests package if needed
Browse files Browse the repository at this point in the history
The distro might have requests < 2.29.0 already so that the package
doesn't need to be downgraded. Actually an attempt to downgrade it fail
the playbook.

Fixes confidential-containers#206
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
  • Loading branch information
wainersm committed May 22, 2023
1 parent ee64c3a commit b0de292
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/e2e/ansible/start_docker_registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@
# 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
pip:
name: requests
version: 2.28.1
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: Start a docker registry
docker_container:
name: "{{ local_registry_name }}"
Expand Down

0 comments on commit b0de292

Please sign in to comment.