Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Pin requests' version less than 2.32 #382

Merged

Conversation

BbolroC
Copy link
Member

@BbolroC BbolroC commented May 23, 2024

The issue docker/docker-py#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"

Initially, we attempted to allow pip to install requests according to its dependency tree.
However, the issue persists on Ubuntu 22.04, and it appears to be related to docker/docker-py#3256.
The best solution so far is to pin the version of the package to less than 2.32.

The change is verified at https://github.com/confidential-containers/operator/actions/runs/9204691086?pr=382

Fixes: #381

Signed-off-by: Hyounggyu Choi [email protected]

@BbolroC BbolroC changed the title CI: Unpin requests pip package WIP CI: Unpin requests pip package May 23, 2024
@BbolroC BbolroC force-pushed the fix-docker-issue-on-runner branch from 12a9d15 to dbc8478 Compare May 23, 2024 08:24
@BbolroC BbolroC changed the title WIP CI: Unpin requests pip package CI: Unpin and keep requests pip < 2.32 May 23, 2024
Copy link
Member

@stevenhorsman stevenhorsman left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @BbolroC!

@BbolroC BbolroC force-pushed the fix-docker-issue-on-runner branch from dbc8478 to c86b501 Compare May 23, 2024 09:14
@BbolroC BbolroC changed the title CI: Unpin and keep requests pip < 2.32 CI: Pin requests' version less than 2.32 May 23, 2024
The issue docker/docker-py#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"

Initially, we attempted to allow pip to install requests according to its dependency tree.
However, the issue persists on Ubuntu 22.04, and it appears to be related to
docker/docker-py#3256.
The best solution so far is to pin the version of the package to less than 2.32.

Fixes: confidential-containers#381

Signed-off-by: Hyounggyu Choi <[email protected]>
@BbolroC BbolroC force-pushed the fix-docker-issue-on-runner branch from c86b501 to 5eaedb9 Compare May 23, 2024 09:15
- 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)"
Copy link
Member

Choose a reason for hiding this comment

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

The other day I was looking for this exact line and I couldn't find. This is a good way to compare semver numbers in bash. So long lovely code, so long!

fi
name:
- docker
- requests<2.32
Copy link
Member

Choose a reason for hiding this comment

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

And I didn't know we could specify '<', '>', ...., in this command. Cool!

Copy link
Member

@wainersm wainersm left a comment

Choose a reason for hiding this comment

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

@BbolroC great debug and fix! thanks!

@wainersm wainersm merged commit 7585bc3 into confidential-containers:main May 23, 2024
10 checks passed
@BbolroC BbolroC deleted the fix-docker-issue-on-runner branch May 23, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: Unsupported URL scheme http+docker encountered while installing local registry
4 participants