-
Notifications
You must be signed in to change notification settings - Fork 122
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
Incompatibility between requests 2.29.0 and/or urllib3 2.0.0 and vendored Docker SDK for Python code #611
Comments
|
After looking at things a bit more, I think the problem isn't really requests + urllib3, but a specific requests 2.29.0 feature: psf/requests#6226. Since Docker SDK for Python - and now us - define some HTTP adapters for Unix connections etc. that don't provide the native chunking abilities that urllib3 provides, they probably cause the failures. |
The following excerpt of the first stack trace highlights this:
Also it looks like urllib3 < 2.0.0 is installed in the AZP run that fails. (The GHA run does have urllib3 2.0.0.) |
I created #612 to restrict requests to < 2.29.0 for now. |
@felixfontein any news when a new release of the collection will be published that contains the workarround |
@ntimo do you have this problem with an EE? If not, this is nothing a new release of the collection will fix, since then you are responsible yourself to install requests. |
In order to properly install the dependencies for the docker module, I had to do this:
Is there a better way to do so? |
@fcecagno right now there isn't (at least not that I'm aware of). |
community.docker 3.4.4 is out which restricts requests and urllib3 to |
See also related bug report for more details: ansible-collections/community.docker#611
@felixfontein should we wait for an Ansible release with community.docker 3.4.4? I'm not aware of the process, if you could please clarify. |
@fcecagno please note that 3.4.4 only helps you if a) you read the docs, or b) you create an Execution Environment. For EEs you don't need Ansible, and for a) you don't need it either (https://github.com/ansible-collections/community.docker#collection-documentation). So there's no need to wait for another Ansible release for 3.4.4. |
#613 hopefully resolves the requests 2.29.0 incompatibility. |
Would be great if some of you have time to test #613, especially for the transports I don't really use (I only use Unix sockets; there are minimal SSH tests in CI, but that's it). |
Docker SDK 6.1.0 has been released which fixes this problem. The main change is basically what we have in #613. |
community.docker 3.4.5 is out and fixes this. |
to resolve molecule test failure. More details: ansible-collections/community.docker#611 Signed-off-by: everettraven <[email protected]>
Still, observe this issue on the newly installed ansible via pipx (pipx install --include-deps ansible) {"changed": false, "msg": "Error connecting: Error while fetching server API version: HTTPConnection.request() got an unexpected keyword argument 'chunked'"}
|
@pustovit the docker_compose module (now deprecated) uses a old version of Docker SDK for Python which does not have a fix for this. You have to make sure to install the right version of requests. It's better if you switch to the docker_compose_v2 module, which no longer uses docker-compose 1.x.y (which has been End of Life for several years by now). |
to resolve molecule test failure. More details: ansible-collections/community.docker#611 Signed-off-by: everettraven <[email protected]>
SUMMARY
Currently there are a lot of CI failures. The problem seems to be urllib3 2.0.0, which has trouble with some requests versions: docker/docker-py#3113
ISSUE TYPE
COMPONENT NAME
various
The text was updated successfully, but these errors were encountered: