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

Update pack install action so it works correctly when --python3 flag and "python_versions" pack.yaml attribute is used #4662

Merged
merged 6 commits into from
May 7, 2019

Conversation

Kami
Copy link
Member

@Kami Kami commented May 6, 2019

This pull request updates / fixes packs.install action (and st2-pack-install binary) so it works correctly when pack.yaml metadata file includes python_versions attribute and when --python3 flag is used for installation.

Background, Context

In v3.0.0, new python_versions attribute was added to pack.yaml. With this attribute pack can declare which Python versions it supports / works with (Python 2.x and Python 3.x). This attribute is used by our Exchange CI to run checks and tests under correct Python versions.

In addition to that, it's also used by packs install action and binary. If user tries to install a pack on an unsupported Python version, an error is returned.

In the past, we added --python3 flag to pack install command. With this command, user can use Python 3 binary for a specific pack when StackStorm itself runs under Python 2. This pull request fixes this functionality so it works correctly when pack metadata specifies python_versions attribute.

NOTE: Mixing Python 2 and 3 has a lot of edge cases so I also plan to document that (a lot of packs may not work, especially the ones with rely on C extensions, etc.). Once Ubuntu Bionic packages with native Python 3 support go GA we should probably deprecate --python3 flag or at least make it less prominent.

Resolves #4654.

@Kami Kami added the bug label May 6, 2019
@Kami Kami added this to the 3.0.1 milestone May 6, 2019
@Kami
Copy link
Member Author

Kami commented May 7, 2019

I'm re-running Ubuntu Xenial tests. I have no idea why they failed 2 times in a row.

I verified it locally under Python 3 and everything looks in order.

@Kami Kami merged commit c3affe5 into master May 7, 2019
@Kami Kami deleted the python3_flag_python_versions_attribute branch May 7, 2019 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ST2 3.0 Pack Install Fails if pack.yaml specifies only python3
2 participants