-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: person-overrides writes #14368
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
Conversation
Hey @tiina303! 👋 |
99e221e
to
a86944c
Compare
a86944c
to
0835493
Compare
0835493
to
f5d2c0d
Compare
await expect( | ||
Promise.all([ | ||
updatePersonStateFromEvent({ | ||
event: '$identify', | ||
distinct_id: 'second', | ||
properties: { | ||
$anon_distinct_id: 'first', | ||
}, | ||
}), | ||
updatePersonStateFromEvent({ | ||
event: '$identify', | ||
distinct_id: 'third', | ||
properties: { | ||
$anon_distinct_id: 'second', | ||
}, | ||
}), | ||
]) | ||
).rejects.toThrow() |
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 test is failing, but I don't really understand how the whole postgresTransaction
mock works or is intended to work. This is not throwing as both queries are running sequentially.
I'm also confused why we await
the same below but without expecting it to throw
.
😕
@@ -62,6 +64,7 @@ export class PersonState { | |||
statsd: StatsD | undefined, | |||
personManager: PersonManager, | |||
personContainer: LazyPersonContainer, | |||
poEEmbraceJoin: boolean, |
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.
As the PersonState
constructor
got a new parameter, we need to update the corresponding it('updates person')
test in tests/worker/ingestion/event-pipeline/processPersonsStep.test.ts
to either pass this parameter or expect it to be undefined. We are calling a mock anyways so either one should be fine.
Problem
#13999 - as rebasing got complex 😅
Changes
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
How did you test this code?