-
-
Notifications
You must be signed in to change notification settings - Fork 739
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
Pass many 'register' components for 'packs.install', 'packs.load', 'st2ctl reload' #1619 #1624
Conversation
st2ctl reload --register-sensors st2ctl reload --register-sensors --register-rules st2ctl reload st2ctl reload --verbose
…1619 # st2 run packs.load register=rules,sensors st2 run packs.install packs=hubot register=aliases,rules # by default registers 'actions,aliases,sensors' st2 run packs.load st2 run packs.install packs=hubot
if [ -z ${2} ]; then | ||
REGISTER_FLAGS="--register-sensors --register-actions --register-aliases" |
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.
Yeah, this is a lot better. Hated this monstrosity :P
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.
I'm just slightly worried, since I don't remember if we have any end to end tests for st2ctl.
If we don't, now it would be a good time to add some to st2tests repo.
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.
st2tests looks like some kind of acceptance tests, pretty cool thing. I'll do it a bit later.
This works for me. We can sort out the array pieces laters. The only drawback with string are the type is that |
Good point, |
@manasdk when you'll have time take a look at that #1231 (comment) if it's possible to do it in right way. Splitting that string into array is absolutely dirty hackery. If possible, I would be happy to use an array there. |
@Kami if this PR looks ok for you, can you double-check and merge it? |
Sorry for the delay. I will go ahead, test it and if everything looks OK, merge it. Tests are not a blocker right now, but having them asap would be great :) |
Pass many 'register' components for 'packs.install', 'packs.load', 'st2ctl reload' #1619
Merged into master - changes look and work fine. Thanks. |
Thanks! |
Problem
One of the problems described in #1619 is that
packs.install
reloads onlyactions
by default, bringing problems (especially in ChatOps) when installed pack contains aliases or sensors:Solution
This PR brings possibility to pass several
register
components.If not provided
register=actions,aliases,sensors
is default value.which would trigger reload with many arguments (only 1 was accepted before):