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

Remove outdated azure-iot-hub from requirements #1512

Conversation

gygitlab
Copy link

@gygitlab gygitlab commented Mar 25, 2024

SUMMARY

PR removes azure-iot-hub from the requirements list as it depends on the now deprecated azure-uamqp-python that is failing to build on popular systems such as Mac ARM and Linux ARM on Python 3.12+.

azure-iot-hub itself hasn't had any updates in several years and is specific to one part of Azure functionality, IoTHub, that is probably better handled as an opt in at this time until it's been updated to no longer depend on deprecated packages.

Resolves #1505
Resolves #1511

ISSUE TYPE
  • Bugfix Pull Request

Stale and depends on deprecated packages that don't build on all systems
@Fred-sun
Copy link
Collaborator

@gygitlab We can't remove this directly because we also need the package 'azure-iot-hub' to manage Iot-related resources. If you want to discard, you need to replace the package with another package. Thank you!

@Fred-sun Fred-sun added medium_priority Medium priority work in In trying to solve, or in working with contributors labels Mar 26, 2024
@gygitlab
Copy link
Author

gygitlab commented Mar 26, 2024

Thanks @Fred-sun and fair enough.

Nonetheless you have a problem then as that package hasn't been updated in 2 years and a package it subsequently depends on (azure-uamqp-python) is now deprecated and does not build on Mac ARM devices or Linux ARM devices running on Python 3.12+ - This prevents the entire Ansible collection from being run on these devices. It's likely this blast radius will increase.

The way I see it you have 2 choices - Find someone who can update azure-iot-hub to remove it's dependency on the now deprecated azure-uamqp-python package, which from the looks of things has had no activity in years or remove this hard dependency from the collection and make it optional.

@Fred-sun
Copy link
Collaborator

Fred-sun commented Apr 1, 2024

@gygitlab This PR is not compliant, so do you want to re-submit and replace the original dependency package, or close it temporarily and we will replace this package? Thank you!

@gygitlab
Copy link
Author

gygitlab commented Apr 1, 2024

Closing as requested.

@ssbarnea
Copy link
Member

Maybe as temporary measure, in order to allow packaging and installation of this collection on all supported platforms, I suggest making this component optional, basically changing to something like:

azure-iot-hub==2.6.1;platform_machine=="x86_64"

@msamad
Copy link

msamad commented Jul 24, 2024

Hi, had the same issue, did a workaround to remove the azure-iot-hub from the requirements.txt and the rest worked fine.

ansible-galaxy collection install azure.azcollection:==2.6.0 --force

# Remove azure-iot-hub line so it removes dependency on uamqp
RUN sed -i '/azure-iot-hub/d' ~/.ansible/collections/ansible_collections/azure/azcollection/requirements.txt

RUN pip install -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements.txt

I did it in a docker container, some details below

alpine:3.18.2
Python 3.11.8
pip 24.1.2
azure.azcollection 2.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority work in In trying to solve, or in working with contributors
Projects
None yet
4 participants