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

Dependency update required but update not working #134

Closed
Schtevy opened this issue Jan 19, 2020 · 8 comments
Closed

Dependency update required but update not working #134

Schtevy opened this issue Jan 19, 2020 · 8 comments

Comments

@Schtevy
Copy link

Schtevy commented Jan 19, 2020

First of all, I am pretty aware that the issue might be related to my local Mac + Homebrew + Python config.

But maybe it is not my fault and the CLI has an issue? πŸ€·β€β™‚οΈ

My main goal is to monitor my events via CLI...

➜ az iot hub monitor-events --hub-name my-hub-123
Dependency update required for IoT extension version: 0.8.7. 
Updated dependency must be compatible with uamqp 1.1.0. Continue? (y/n) -> y
Updating required dependency...
Failure updating uamqp 1.1.0. Aborting...

So my first question is - does this download new/different python packages?
Does it download uamqp 1.1.0 or other abstract dependencies?
I personally think this message is kind of irritating.

Furthermore - what went wrong?
Ich think the error message is a bit too generic. A bit more details would help a lot.

➜ pip --version
pip 19.3.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
➜ python --version
Python 3.7.6
➜ which python
/usr/local/opt/python/libexec/bin/python
➜ az extension list                         
[
  {
    "extensionType": "whl",
    "name": "azure-cli-iot-ext",
    "version": "0.8.7"
  }
]

Any idea where the issue is?

@digimaun
Copy link
Member

Hey @SteffenBurger , thanks for submitting this issue.

First I wanted to double-check your az cli was installed via the recommended installation process for Macs.

Next, the "dependency update" for this version of the IoT extension is specifically uamqp 1.1.0 and its dependencies. Normally (in working condition) you would run into the dependency prompt only once per new installation of the extension (this is of course only used for amqp based commands).

Now to see a lot more detail about the operation append "--debug" to the command. This should provide more info on the failure. One potential issue is you could be running into a "No matching distribution found" error. If so, that's because the extension is using a dated version of uamqp which doesn't support your environment. We are working on an update to upgrade the uamqp version to be released in the near future. But lets see what the debug logs say and go from there.

I personally think this message is kind of irritating.

Other than better error handling to show what went wrong without debug switches, is there something else about the message you would like to see improved?

@Plork
Copy link

Plork commented Jan 28, 2020

I have exactly the same atm, I thought it was my local pyenv as well .. so i tried the azure-cli docker image. But in there I got the same

bash-5.0# az extension add --name azure-cli-iot-ext
bash-5.0# az iot hub monitor-events -n #####.azure-devices.net
Dependency update required for IoT extension version: 0.8.8.
Updated dependency must be compatible with uamqp 1.1.0. Continue? (y/n) -> y
Updating required dependency...
Failure updating uamqp 1.1.0. Aborting..
Building wheels for collected packages: uamqp
  Building wheel for uamqp (setup.py): started
  Building wheel for uamqp (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
Failed to build uamqp
ERROR: azure-cli-core 2.0.80 has requirement wheel==0.30.0, but you'll have wheel 0.33.6 which is incompatible.

@digimaun
Copy link
Member

@Plork , its expected that event monitoring will not work in the azure-cli docker image because the image is based on alpine linux. The key for event monitoring to work is the native uamqp library which does not have a distribution for alpine but there is a request for it. If you just need a compatible shell environment you can use Azure Cloud Shell.

We just released version 0.8.9 of the IoT extension which may resolve these issues. I am assuming you are also on a MacOS environment? I was able to run monitor-events with no issues on a macOS Catalina 10.15.3 mac book pro and installing azure cli via homebrew.

To install the latest remove any previous IoT extension version if it exists then install the newest release with the following command:
az extension add --source https://github.com/Azure/azure-iot-cli-extension/releases/download/v0.8.9/azure_cli_iot_ext-0.8.9-py2.py3-none-any.whl

@SteffenBurger can you also give 0.8.9 a try?

@Plork
Copy link

Plork commented Jan 29, 2020

nice the 0.8.9 works fine again! thnx

@digimaun
Copy link
Member

digimaun commented Feb 3, 2020

This issue should be resolved in 0.8.9 (with Plork confirming the release fixes the issue for them). If there are still problems we can re-open.

@digimaun digimaun closed this as completed Feb 3, 2020
@pihai
Copy link

pihai commented Nov 12, 2020

I still have this problem in the current docker image:

az-dock-ver

monitor

@digimaun
Copy link
Member

@pihai This is because the Azure CLI docker image uses alpine linux, which the AMQP provider uamqp does not have a pre-built distribution available.

You can get around this by building the package locally. When you run the monitor-events command and there is no installable distribution available it will attempt to build, but that error is caused by the environment not having the required build dependencies.

Installing the following build dependency packages prior to running the command should resolve the issue.

apk add build-base cmake

Let me know if this workaround works for you.

@pihai
Copy link

pihai commented Nov 16, 2020

Yes that works, thank you.
However, I think it should work by default in the official image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants