Skip to content
New issue

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

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

Already on GitHub? # to your account

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

Open
gaelgatelement opened this issue Jul 26, 2024 · 0 comments
Open
Labels
area/dependency Issues or PRs related to dependency changes

Comments

@gaelgatelement
Copy link
Contributor

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 ?

@gaelgatelement gaelgatelement changed the title ansible-operator-plugins relying on abandonned python packages ansible-operator-plugins relying on abandoned python packages Jul 26, 2024
@acornett21 acornett21 added the area/dependency Issues or PRs related to dependency changes label Jul 26, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/dependency Issues or PRs related to dependency changes
Projects
None yet
Development

No branches or pull requests

2 participants