-
-
Notifications
You must be signed in to change notification settings - Fork 752
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
is no sudo binary available.
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.
action fails before producing any output.
are not git repositories (think contrib/core).
bigmstone
approved these changes
Jun 26, 2019
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.
LGTM
m4dcoder
approved these changes
Jun 26, 2019
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.
LGTM. It's hard to review the mix of different changes in here. I hope we didn't miss anything.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request contains various changes and fixes which makes StackStorm code more re-usable in different context (think Docker, etc.).
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.Update list of scripts defined in
st2common/setup.py
(list was out of date, missing some scripts and containing some old ones).Update
move_pack
function so it works in Docker and other environments wheresudo
is not available.Add new
get_runner_module
utility method which reduces code duplication.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 callingprocess.kill()
which means that in some scenarios,process.kill()
would overwrite this code.Make concurrency model for
st2common.util.green.*
modules pluggable. This way eithereventlet
orgevent
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 noteventlet
).Upgrade
tooz
to1.65.0
since older version depends on old version ofgrpcio
which causes conflicts with other libraries which depend on newer versions ofgrpcio
Update
st2-pack-install
CLI command so it supports installing local packs which are not git repositories.