-
Notifications
You must be signed in to change notification settings - Fork 9
Check for Ubuntu 16.04 and conditionally install Python 3.6 and configure ST2 to use it #194
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
Conversation
0674b36 to
a27c9d9
Compare
…gure ST2 to use it
a27c9d9 to
8aacaee
Compare
|
This code does not change what StackStorm itself runs under, and yes, on Ubuntu 16 and RHEL 7, StackStorm itself runs with Python 2.7. What this change does is tweak what version of Python StackStorm uses when installing packs with the One point to consider is that this should work just fine for the current unstable builds, but we might want to consider continuing to use Python 3.5 for the stable builds on Ubuntu 16 and any 3.3.x releases. |
arm4b
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per discussion we agreed to provide python3.6 PPA via curl|bash installer based on user's y/n input. See: StackStorm/st2-packages#681 and we can adjust this PR afterwards.
That would be better as adding repo beforehand defeats the purpose of end-to-end tests.
5720dd4 to
7499b7f
Compare
7499b7f to
0dfc064
Compare
…strap script to do it
2e2b7dd to
7c54683
Compare
|
I reworked this to use |
|
Excellent - LGTM - should fix the E2Es. |
|
Once our current E2E builds finish up I'll install this branch on st2cicd and try it out. I won't merge this until it's at least tested. |
| # If pipe_into_bootstrap_script is not empty, return it + " | " | ||
| # If pipe_into_bootstrap_script is empty, return an empty string | ||
| cmd: >- | ||
| <% switch(ctx().pipe_into_bootstrap_script => concat(ctx().pipe_into_bootstrap_script, " | "), true => "") %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should work in this particular case.
However I provided --u16-add-insecure-py3-ppa flag as identified more bash corner cases with the interactive mode under different environments. StackStorm/st2-packages#682. It might be more clear to rely on that new flag.
| bash /tmp/st2_bootstrap.sh | ||
| --<% ctx().pkg_env %> | ||
| --<% ctx().release %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to pass that U16 flag to script directly without extra workflow logic as our installer is catch-all and won't fail in case of non-existent CLI param provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As StackStorm/st2-packages#682 is now merged, you can add --u16-add-insecure-py3-ppa
The end-to-end tests are failing on Ubuntu 16 because they don't have Python 3.6 available, which is blocking my PR #5064:
This PR tweaks the
st2_pkg_e2e_testworkflow to check for Ubuntu 16 and if detected, installs Python 3.6 from thedeadsnakesPPA and configures StackStorm to use it utilizing thepatchutility and Bash heredocs.