-
Notifications
You must be signed in to change notification settings - Fork 515
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
Fix: stateless record webhooks #1124
Fix: stateless record webhooks #1124
Conversation
Error on the side of caution for BaseRecord.emit_event, using topic without state when none is given, and inserting the serialized record as the payload if no payload is given. Events are only not emitted by records when no record topic is set. Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Should now accept stateless record event topics Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
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.
Looks good! Thanks for the quick fix :)
@@ -1,7 +1,9 @@ | |||
from aries_cloudagent.core.event_bus import Event |
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.
nit: absolute import
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.
Auto-import failed me 🙂 fixed
Codecov Report
@@ Coverage Diff @@
## main #1124 +/- ##
==========================================
+ Coverage 99.19% 99.20% +0.01%
==========================================
Files 383 383
Lines 22133 22139 +6
==========================================
+ Hits 21954 21964 +10
+ Misses 179 175 -4 |
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
This should hopefully address #1123.
Changes
fix: stateless records emit events
Error on the side of caution for BaseRecord.emit_event, using topic
without state when none is given, and inserting the serialized record as
the payload if no payload is given.
Events are only not emitted by records when no record topic is set.
fix: relax admin server record event pattern
Should now accept stateless record event topics
fix: add event namespace to base records to allow plugins to override
test: record topic parsing for webhook