Skip to content

ansible-operator-plugins relying on abandoned python packages #86

@gaelgatelement

Description

@gaelgatelement

While trying to update some internal packages of our ansible-operator project, I stumbled upon upgrading requests to >2.32.0.

The update is breaking ansible-runner :

n  File \"/usr/local/lib/python3.11/site-packages/ansible_runner/interface.py\", line 210, in run
    r.run()
  File \"/usr/local/lib/python3.11/site-packages/ansible_runner/runner.py\", line 118, in run
    self.status_callback('starting')
  File \"/usr/local/lib/python3.11/site-packages/ansible_runner/runner.py\", line 106, in status_callback
    ansible_runner.plugins[plugin].status_handler(self.config, status_data)
  File \"/usr/local/lib/python3.11/site-packages/ansible_runner_http/events.py\", line 35, in status_handler
    status = send_request(plugin_config['runner_url'],
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.11/site-packages/ansible_runner_http/events.py\", line 18, in send_request
    return session.post(url_actual, headers=headers, json=(data))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.11/site-packages/requests/sessions.py\", line 637, in post
    return self.request(\"POST\", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.11/site-packages/requests/sessions.py\", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.11/site-packages/requests/sessions.py\", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/local/lib/python3.11/site-packages/requests/adapters.py\", line 637, in send
    raise InvalidURL(e, request=request)
requests.exceptions.InvalidURL: Not supported URL scheme http+unix
","job":"6155899176617848299","name":"instance-63aceaed9fa344cb","namespace":"element-tests-63acea","error":"exit status 1","stacktrace":"github.com/operator-framework/ansible-operator-plugins/internal/ansible/runner.(*runner).Run.func1
\tansible-operator-plugins/internal/ansible/runner/runner.go:269"}  

On investigating the issue, I found out that request-unixsocket breaks with requests 2.32 : msabramo/requests-unixsocket#73 . But the project is abandoned, and a fork as been started as requests-unixsocket2. This project fixes the breakage.

The problem is that to upgrade to requests-unixsocket2, we need to update the dependencies of ansible-runner-http :


ansible-runner-http 1.0.0
├── ansible-runner *
│   ├── importlib-metadata >=4.6,<6.3 
│   │   └── zipp >=0.5 
│   ├── packaging * 
│   ├── pexpect >=4.5 
│   │   └── ptyprocess >=0.5 
│   ├── python-daemon * 
│   │   ├── docutils * 
│   │   ├── lockfile >=0.10 
│   │   └── setuptools >=62.4.0 
│   ├── pyyaml * 
│   └── six * 
├── requests *
│   ├── certifi >=2017.4.17 
│   ├── charset-normalizer >=2,<4 
│   ├── idna >=2.5,<4 
│   └── urllib3 >=1.21.1,<3 
└── requests-unixsocket *
    └── requests >=1.1 
        ├── certifi >=2017.4.17 
        ├── charset-normalizer >=2,<4 
        ├── idna >=2.5,<4 
        └── urllib3 >=1.21.1,<3 

But the project is also abandoned : https://github.com/ansible/ansible-runner-http

Overall, all of this feels like a significant problem for the future of the ansible-operator-plugins project of the operator-sdk :

Is there any plan to address this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/dependencyIssues or PRs related to dependency changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions