-
-
Notifications
You must be signed in to change notification settings - Fork 751
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
ST2 3.0 Pack Install Fails if pack.yaml specifies only python3 #4654
Comments
Thanks for bringing this up. Quickly from top of my head - In fact, it's planned to be removed in the near future because there are too many edge cases when mixing Python versions - StackStorm running under Python 2 and (some) packs running under Python 3. It also causes unnecessary confusion when things fail when mixing Python versions (some packs work in a mixed environment, but a lot don't and produce "cryptic" errors which cause confusion). |
Yea - I get it. I just got “stuck” trying to install one of my py3 only packs.
At the end of the day - the bug still stands - can’t install a —python3 only pack when defined in pack.yaml - do you agree?
… On Apr 30, 2019, at 3:06 PM, Tomaz Muraus ***@***.***> wrote:
Thanks for bringing this up.
Quickly from top of my head - --python3 flag was really just a temporary workaround until we produce official packages which run all StackStorm components / services under Python 3 (this is now already the case for Ubuntu Bionic packages) so --python3 flag functionality is not intended to work with new python_versions pack.yaml attribute.
In fact, it's planned to be removed in the near future because there are too many edge cases when mixing Python versions - StackStorm running under Python 2 and (some) packs running under Python 3.
It also causes unnecessary confusion when things fail when mixing Python versions (some packs work in a mixed environment, but a lot don't and produce "cryptic" errors which cause confusion).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#4654 (comment)>, or mute the thread </~https://github.com/notifications/unsubscribe-auth/AAIMM6UHWHBCWF53ZODK3ATPTCKDHANCNFSM4HJO7YNA>.
|
It should work if your StackStorm components are running under Python 3 - that's what the It tells StackStorm under which Python versions pack works (and is tested with) and if you try to install it on an unsupported version it will throw an error. |
And to add to my point above - yes, our documentation is not currently clear about that and we plan to fix that in time for v3.1.0 when Ubuntu Bionic packages which run StackStorm components under Python 3 go GA. And sorry if the lack of documentation caused confusion. |
Wait - so are you saying - that - if I have python3 installed - and my understanding is that a |
Having Python 3 installed is not enough - you need to have all the StackStorm components running under Python 3 and at the moment that's only the case with beta Ubuntu Bionic packages. This means packs which mark that they only work under Python 3 will only work on Ubuntu Bionic if you are using official packages (in theory you could also run StackStorm components under Python 3 on other distros, but that's not something we officially support). In the past, the idea behind It turned out though there are too many edge cases when supporting such mixed environments so we don't plan support that in the future anymore. And it would also be very hard and expensive (maintenance wise) to also run continuous integration system which tests all the packs in a mixed environment (in addition to testing packs under standalone Python 2 and standalone Python 3 StackStorm installation). |
One option would be for us to leave the flag there and make it work in combination with |
Ok - so - can you help me understand if:
I have a python3 pack, and I’m on CentOS, how can I ensure my stuff will work for the time being?
… On Apr 30, 2019, at 3:21 PM, Tomaz Muraus ***@***.***> wrote:
Having Python 3 installed is not enough - you need to have all the StackStorm components running under Python 3 and at the moment that's only the case with beta Ubuntu Bionic packages. This means packs which mark that they only work under Python 3 will only work on Ubuntu Bionic if you are using official packages.
In the past, the idea behind --python3 flag was that you could have StackStorm components running under Python 2 and Python 3 installed on the system and also some packs using Python 3 for pack virtual environment.
It turned out though there are too many edge cases when supporting such mixed environments so we don't plan support that in the future anymore.
And it would also be very hard and expensive (maintenance wise) to also run continuous integration system which tests all the packs in a mixed environment (in addition to testing packs under standalone Python 2 and standalone Python 3 StackStorm installation).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#4654 (comment)>, or mute the thread </~https://github.com/notifications/unsubscribe-auth/AAIMM6RTXSZUV5PQO7BWXGLPTCL5NANCNFSM4HJO7YNA>.
|
Gotcha. I haven’t had any problems yet, once my pack is installed, so I’m going to roll with that since, it’s my understanding in the near future everything will be only python3.
… On Apr 30, 2019, at 3:24 PM, Tomaz Muraus ***@***.***> wrote:
One option would be for us to leave the flag there and make it work in combination with python_versions attribute as per your use-case in v3.1.0, but that would be experimental and not officially supported feature since a lot of packs don't work in such mixed Python environments.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#4654 (comment)>, or mute the thread </~https://github.com/notifications/unsubscribe-auth/AAIMM6UZJ4EDV6A7LMOAPYTPTCMGBANCNFSM4HJO7YNA>.
|
If you need a temporary solution for your scenario you can try using But again, there is no guarantees it will work - if it does though, great :) |
Regarding this - If I'm building out net new packs, then I'm fine with experimental since I own them. I like this idea. Really what I care most about is - in the event I wish to use the pack.yaml syntax for python3 support, I don't wish to be required to also put |
Yeah, after some more discussion with others, we will go with that approach in v3.1. We will make Thanks again for bringing this up. |
@Kami Thanks for the feedback. I like what you proposed and it will solve a challenge for me, which in my case we do not have any 3rd party Py packages that have C extension dependencies. Thank you for being so responsive. |
yup no problem, thanks for the tweaks |
SUMMARY
ST2 3.0 Pack Install Fails if pack.yaml specifies only python3
My assessment it that logic is missing to allow just
--python3
to be declared in pack.yamlIn addition - it appears I could successfully install a pack into a py2 venv, but the code actually requires py3.
ISSUE TYPE
STACKSTORM VERSION
st2 3.0.0, on Python 2.7.5
OS / ENVIRONMENT / INSTALL METHOD
vagrant, st2 3.0 EWC, Centos 7.6 w/python3.6
STEPS TO REPRODUCE
st2 --debug pack install file:///$PWD --python3
or st2 --debug pack install file:///$PWD` or an appropriate st2 pack install command with the above yaml fileEXPECTED RESULTS
A successful pack install for python3 actions
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: