Skip to content

Conversation

tiina303
Copy link
Contributor

@tiina303 tiina303 commented Feb 22, 2023

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?

@posthog-bot
Copy link
Contributor

Hey @tiina303! 👋
This pull request seems to contain no description. Please add useful context, rationale, and/or any other information that will help make sense of this change now and in the distant Mars-based future.

@tiina303 tiina303 force-pushed the write-person-overrides branch from 99e221e to a86944c Compare February 22, 2023 13:44
@tiina303 tiina303 force-pushed the write-person-overrides branch from a86944c to 0835493 Compare February 22, 2023 13:50
@tiina303 tiina303 force-pushed the write-person-overrides branch from 0835493 to f5d2c0d Compare February 22, 2023 13:53
Comment on lines +2388 to +2405
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()
Copy link
Contributor

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,
Copy link
Contributor

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.

Base automatically changed from fix/add-person-consrtaint-on-override to master February 28, 2023 13:30
@tiina303 tiina303 closed this Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants