-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Missing old row on automations #14862
Conversation
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
@@ -54,7 +66,9 @@ class AutomationEmitter { | |||
appId, | |||
row, | |||
table, | |||
oldRow, |
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.
This is the actual fix
@@ -49,3 +60,32 @@ export interface UserCtx<RequestBody = any, ResponseBody = any> | |||
export interface BBContext extends Ctx { | |||
user?: ContextUser | |||
} | |||
|
|||
export interface ContextEmitter { |
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.
This is really nice, I was actually confused about this the other day when trying to track down some emitter issues - the fact we had the AutomationEmitter and the standard emitter etc. Really nice stuff!
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!
Description
We had an issue where some chained automations were not passing the proper data, missing some data such as "oldRow". The problem was that it was not properly sent, and while debugging the issue I realised that there is not much typing around automation emitters.
This PR is mainly typing everything around emitters to stop using magic strings, parameters and
any
s. It also fixes the actual issue, passing theoldRow
accordingly.