-
-
Notifications
You must be signed in to change notification settings - Fork 750
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
Add publisher to ActionAlias #5763
Add publisher to ActionAlias #5763
Conversation
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.
Awesome! I just found one more file we need to edit to make these events available in the event stream.
Would you please add the ActionAlias queue to this list:
st2/st2common/st2common/stream/listener.py
Lines 203 to 224 in 8496bb2
return [ | |
consumer( | |
queues=[STREAM_ANNOUNCEMENT_WORK_QUEUE], | |
accept=["pickle"], | |
callbacks=[self.processor()], | |
), | |
consumer( | |
queues=[STREAM_EXECUTION_ALL_WORK_QUEUE], | |
accept=["pickle"], | |
callbacks=[self.processor(ActionExecutionAPI)], | |
), | |
consumer( | |
queues=[STREAM_LIVEACTION_WORK_QUEUE], | |
accept=["pickle"], | |
callbacks=[self.processor(LiveActionAPI)], | |
), | |
consumer( | |
queues=[STREAM_EXECUTION_OUTPUT_QUEUE], | |
accept=["pickle"], | |
callbacks=[self.processor(ActionExecutionOutputAPI)], | |
), | |
] |
Also, just a couple nitpicks.
Thank you so much for working on this!
We might have to wait a bit before merging this as I'm not sure if it can go in the 3.8 release.
Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>
Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>
Thank you very much for finding this place. I totally missed it.
Thank you for reviewing the PR
That's totally fine. I was lately a little busy but it was really nice to work on ST2 and I am planning to keep sticking around. So just let me know if I should rebase the branch or anything else. |
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.
Woohoo! Awesome. Thanks for working on this.
This needs 1 more approval, and @nzlosh needs to decide if it can land in 3.8 or if it needs to wait till after we finish cutting that 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.
Minor comment on changelog, and I'm wondering if its possible to add some unit-tests for the changes.
I just went through a bunch of tests to see which tests deal somehow with publishing messages on the queue. In most cases, it is mocking or ignoring the message queue publishing. Based on that, I think we could add some tests in
I don't see how we can test this without effectively testing kombu+RabbitMQ, since much of the added code added in this PR deals with wiring up the exchange+queue, setting it up for publishing. We could also add a db test similar to the @amanda11 Does that sound like what you'd like to see? Would tests like this have value? Here are my raw notes:
mock publishers in: |
@cognifloyd @ubaumann Is this still WIP? |
I would love to see this merged. I'm satisfied with this without the tests. But, @amanda11 mentioned adding tests, so I tried to figure out what tests we could add. @rush-skills wdyt? Does this need tests? |
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 happy to merge as is, without the extra tests. I'd rather it be in, than wait months for tests...
Add publisher to ActionAlias to get events for CUD Action Aliases.
This change enables DroidStorm (and other systems) to subscribe the events and get informed when a new Alias is created, updated or deleted.
Manual tested:
./tools/launchdev.sh startclean
)Created and deleted action-alias
Queu consumer
Unitest are covering already testing the generic functions. There are no test testing the object specific events. Should I add some test?
Looking forward to the review and please let me know how I can improve the PR.
Pinging @cognifloyd because we talked already in Slack about the PR.