StackStorm / st2

StackStorm (aka "IFTTT for Ops") is event-driven automation for auto-remediation, incident responses, troubleshooting, deployments, and more for DevOps and SREs. Includes rules engine, workflow, 160 integration packs with 6000+ actions (see https://exchange.stackstorm.org) and ChatOps. Installer at https://docs.stackstorm.com/install/index.html
https://stackstorm.com/
Apache License 2.0
6.07k stars 747 forks source link

Unable to install multidict, yarl #5326

Open rrahman-nv opened 3 years ago

rrahman-nv commented 3 years ago

SUMMARY

I am attempting to add code to wrap ST2 actions to authorize against Azure AD and Slack Channel Memberships. As such there are some py dependencies required for it to work, that do not install in the ST2 virtualEnv due to the below error message.

{{ ERROR: Failed building wheel for yarl ERROR: Could not build wheels for multidict, yarl which use PEP 517 and cannot be installed directly WARNING: You are using pip version 19.1.1, however version 21.2.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command.}}

STACKSTORM VERSION

3.4.1

OS, environment, install method

Post what OS you are running this on, along with any other relevant information/

AWS Elastic Kubernetes Service - AMI Type: AL2_x86_64

Steps to reproduce the problem

  1. import yarl, multidict in your st2 action python code
  2. install the pack
  3. you will see the above py dependency error

Expected Results

It should install the pack with all required dependencies

Actual Results

{{ ERROR: Failed building wheel for yarl ERROR: Could not build wheels for multidict, yarl which use PEP 517 and cannot be installed directly WARNING: You are using pip version 19.1.1, however version 21.2.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command.}}

Is this issue fixed in later releases? I recently upgraded to 3.4.1 so is there a way to retroactively update that version to fix PIP (if that is the root cause?)

amanda11 commented 3 years ago

I presume yarl and multidict are in the requirements.txt file for the pack?

I tried on ST2 3.5.0 with a pack that just had the requirements.txt in it (no actions), and with yarl and multidict in the requirements.txt then the virtualenv created successfully had those modules. But I didn't do any further testing...

$ cat requirements.txt 
yarl
multidict
$ ls /opt/stackstorm/virtualenvs/test1/lib64/python3.6/site-packages/
multidict  multidict-5.1.0.dist-info  yarl  yarl-1.6.3.dist-info

ST2 3.5.0 does use a newer version of pip, and this looks to be a similar problem to https://github.com/StackStorm/st2/issues/5060. The resolution for this was fixed in ST2 3.5 when we updated virtualenv, and therefore the pip version. But if you take a look at this similar issue, the originator of that issue managed to fix it in an earlier version of ST2 by updating the version of virtualenv used by StackStorm on their deployment locally.

rrahman-nv commented 3 years ago

Hi @amanda11 thanks for the reply. I had updated the requirements.txt with the dependencies and hence got the error. So we use EFS as the backend storage for the pack / virtualenv and it is not possible to update the virtualenv locally, unless you have a suggestion on how I can?

stale[bot] commented 2 years ago

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue.