-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Postgres function should_update_person_props #6259
Conversation
Could realistically get rid of #6253 in favor of this if we're able to merge quickly - maybe even make it one migration only 🤔 |
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.
Approving, but do address my comment about equal timestamps function output value before landing.
Could realistically get rid of 6253 in favor of this if we're able to merge quickly
I'm fine with that, see comments there too.
This was forked off
btw you can use --base <the-other-branch-name>
which will make it show only the new code here in code review. Not yet fully sure how to merge on master later, but I think it's possible to select a branch or alternatively rebase on master locally first & force push an update.
Added tests for every potential case the function would encounter.
❤️
@tiina303 well if I set the base as the other branch it will only show what's new but it will be a PR to that branch, not Great comments though, will address |
What's the reason for doing this as a psql function btw? |
@hazzadous this will make things so much cleaner and easier to debug. The query for updating properties is already going to be somewhat messy and this helps abstract some of it away + test it individually. It's not necessary, but much easier to work with/debug/think about conceptually. |
Ok. I wonder what the process is for updating these types of things e.g. do we have to create a migration each time we want to update and test and deploy, and how experienced/comfortable people will be to make changes to this. |
5b13433
to
523d646
Compare
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 🚢
Changes
WIP
This is a key step for https://github.com/PostHog/plugin-server/issues/371
This was forked off of #6253.Putting it out as a WIP in order to get feedback quickly before moving onto plugin server work.
Massive shoutout to @tiina303 for the table you wrote about how this function should behave. Made this so much easier, particularly writing tests.
How did you test this code?
Added tests for every potential case the function would encounter.