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

Various changes and fixes which make StackStorm code more re-usable in different contexts #4713

Merged
merged 22 commits into from
Jun 26, 2019

Conversation

Kami
Copy link
Member

@Kami Kami commented Jun 13, 2019

This pull request contains various changes and fixes which makes StackStorm code more re-usable in different context (think Docker, etc.).

  1. Fix requirements.txt files so they contain all the dependency which are needed. This way st2-pack-* CLI commands work correctly out of the box in a standalone manner (in situation where only st2common is installed.

  2. Update list of scripts defined in st2common/setup.py (list was out of date, missing some scripts and containing some old ones).

  3. Update move_pack function so it works in Docker and other environments where sudo is not available.

  4. Add new get_runner_module utility method which reduces code duplication.

  5. Fix a bug with timeout handling in the Python runner. If action failed before producing any output (stdout, stderr) Python runner would fail on parsing the action output.

    There was also an issue related to how we set process.returncode. We set it before calling process.kill() which means that in some scenarios, process.kill() would overwrite this code.

  6. Make concurrency model for st2common.util.green.* modules pluggable. This way either eventlet or gevent can be used for functions in that package.

    This is important because there are scenarios where eventlet doesn't' work (e.g. gRPC supports gevenet, but not eventlet).

  7. Upgrade tooz to 1.65.0 since older version depends on old version of grpcio which causes conflicts with other libraries which depend on newer versions of grpcio

  8. Update st2-pack-install CLI command so it supports installing local packs which are not git repositories.

Kami added 9 commits May 27, 2019 11:44
This way we can use either eventlet or gevent, depending on the
application (e.g. gRPC doesn't support eventlet so we need to use gevent).

Also fix a bug with where we set returncode on the process. If we set it
before calling kill() it will get overwritten inside kill() method.
@Kami Kami added this to the 3.1.0 milestone Jun 13, 2019
@Kami Kami requested a review from bigmstone June 13, 2019 14:53
Copy link
Contributor

@bigmstone bigmstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@m4dcoder m4dcoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. It's hard to review the mix of different changes in here. I hope we didn't miss anything.

@m4dcoder m4dcoder merged commit 1a52bda into master Jun 26, 2019
@m4dcoder m4dcoder deleted the various_misc_fixes branch June 26, 2019 20:09
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

Successfully merging this pull request may close these issues.

3 participants