0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 09:16:49 +01:00
Commit Graph

1025 Commits

Author SHA1 Message Date
timgl
db6a2d5304
chore(ci): Massively reduce # tests we run (#12139)
* chore(ci): Massively reduce # tests we run

* Update snapshots

* Update snapshots

* Update snapshots

* add tests back in

* Update snapshots

* Update snapshots

Co-authored-by: timgl <timgl@users.noreply.github.com>
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2022-10-08 02:09:57 +01:00
Neil Kakkar
fe62018aed
fix: Filter out invalid persons for person-on-events (#11803) 2022-10-06 10:40:18 +01:00
timgl
24a2329879
perf(retention): Reduce retention mem usage (#11985)
* perf(retention): Reduce retention mem usage

* fix

* Update snapshots

* Update snapshots

Co-authored-by: timgl <timgl@users.noreply.github.com>
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2022-09-27 04:48:28 +01:00
Alex Gyujin Kim
e9047f868f
feat(recordings): add matching events to recordings list query (#11919)
Co-authored-by: alexkim205 <alexkim205@users.noreply.github.com>
2022-09-24 10:49:16 -04:00
Eric Duong
cc2db2e469
fix: formulas not working when multiple group or sessions are included (#11909)
* fix formulas not working when multiple

* Update snapshots

* Update snapshots

Co-authored-by: EDsCODE <EDsCODE@users.noreply.github.com>
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2022-09-22 10:58:24 -04:00
Neil Kakkar
fcdf313e63
fix(retention): Revamp persons modal (#11810)
* fix(retention): Revamp persons modal

* Update snapshots

* clean up & fix things

* Update snapshots

* fix tests, add modal fixes

Co-authored-by: neilkakkar <neilkakkar@users.noreply.github.com>
2022-09-22 10:32:41 -04:00
Paul D'Ambra
cfee66b178
feat: use bulk update for calc event property usage (#11795)
* feat: switch calculate event property types to use bulk update

* remove snapshotting that changes based on clock in test

* update in batches since a few teams have very high numbers of definitions

* expect None not 0 in some tests

* needs to reset to zero every time the count runs

* count definitions from zero on each run

* use column optimizer to count properties

* allow for more thorough property discovery

* exclude person properties from event property calculation
2022-09-13 13:54:18 +01:00
Michael Matloka
5d2ad6c7bb
chore(deps): Update black to 22.8.0 (#11596)
* chore(deps): Update `black` to `22.8.0`

* Format
2022-09-05 14:38:54 +02:00
Karl-Aksel Puulmann
38476aec71
fix(persons): un-ratelimit person destroy, use kafka producer for messages (#11594)
* fix(persons): Make delete_person use kafka producer

This allows these inserts _not_ to take us down

* Remove pdi deletion logic from split_person

This is not needed with the new pdi2 table

* Update create_person_distinct_id to accept is_deleted argument

* Refactor `delete_ch_distinct_ids` to avoid sync_execute

* Remove person#destroy rate limiting

This reverts https://github.com/PostHog/posthog/pull/11576

* Update splitting tests

* Skip tests when not on person-on-events
2022-09-01 14:54:49 +03:00
Ben White
7146b492c3
fix: Persons Search backend (#11586) 2022-09-01 11:09:56 +02:00
Neil Kakkar
17a25011aa
fix: materialised columns (#11558) 2022-08-31 21:02:33 +01:00
Neil Kakkar
37a312d24c
feat(person-on-events): Revamp pagination to handle 'lost' personIDs (#11500) 2022-08-31 14:20:05 +01:00
Eric Duong
92ddf4072b
feat: materialize person and groups on events (#11363) 2022-08-30 12:31:32 +01:00
Eric Duong
b34e307082
fix: querying by adding extra clause to do greedy filtering (#11481)
* fix querying by adding extra clause to do greedy filtering

* Update snapshots

* Update snapshots

* Update snapshots

* select clause

* add extra checK'

* remove unnecessary args

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* adjust table naming

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* use subq pattern

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* conditional

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

Co-authored-by: EDsCODE <EDsCODE@users.noreply.github.com>
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2022-08-25 16:13:03 -04:00
Neil Kakkar
565851626a
chore: Use instance setting for self-hosted person on events (#11472) 2022-08-25 14:28:41 +01:00
Eric Duong
99db479c90
fix(cohort): make cohort recalculation simpler (#11335)
* fix: don't subquery when unnecessary

* fix test

* try replacing

* try simpler query

* replace for now

* use single query remove subquery changes

* remove test

* remove props

* fix return

* Update snapshots

* Update snapshots

* refactor

* Update snapshots

* Update snapshots

* fix unwrapping

* Update snapshots

* Update snapshots

* fix false condition

* Update snapshots

* Update snapshots

* restore _timestamp

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* update snapshot

* add snapshot test

* remove replace

* Update snapshots

Co-authored-by: EDsCODE <EDsCODE@users.noreply.github.com>
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2022-08-23 22:14:41 -04:00
Michael Matloka
5557103cf1
chore(data-m): Make calculate_event_property_usage_for_team smarter (#11440)
Revert "Revert "chore(data-m): Make `calculate_event_property_usage_for_team` smarter" (#11439)"

This reverts commit ad8668208c.
2022-08-23 15:06:24 +00:00
timgl
ad8668208c
Revert "chore(data-m): Make calculate_event_property_usage_for_team smarter" (#11439)
Revert "chore(data-m): Make `calculate_event_property_usage_for_team` smarter (#11396)"

This reverts commit d8190124c5.
2022-08-23 15:39:56 +01:00
Michael Matloka
d8190124c5
chore(data-m): Make calculate_event_property_usage_for_team smarter (#11396)
* chore(data-m): Make `calculate_event_property_usage_for_team` smarter

* Fix import

* Add some comments

* Remove unneeded SQL

* Update manager.py

* Fix function kwarg

* Optimize `GET_EVENT_PROPERTY_SAMPLE_JSON_VALUES`

* Only run complete inference in demo

* Restore `TestPropertyDefinitionAPI` from `master`

* Add `test_complete_inference()` to `TestCalculateEventPropertyUsage`

* Restore `TestPropertyDefinitionAPI` from `master`
2022-08-23 14:09:41 +02:00
timgl
9116dcb253
fix: Fix and improve "Debug CH Queries" (#11150)
* fix: Fix and improve "Debug CH Queries"

* fix tests

* Update snapshots

* Update snapshots

* fix tests

* Update snapshots

* Update snapshots

* fix tests

Co-authored-by: timgl <timgl@users.noreply.github.com>
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2022-08-23 09:27:37 +00:00
Neil Kakkar
46eea77124
fix(experiments): Validate 3 variants for trend experiments, not 2 (#11414)
* fix(experiments): Validate 3 variants, not 2

* fix message

* fix message
2022-08-23 08:04:14 +01:00
timgl
e80fa8b340
fix(persons): ordering and ghost persons (#10980)
* fix(Person): fix ordering of person api

* fix empty users

* fix tests

* fix tests
2022-08-04 14:09:10 +01:00
Neil Kakkar
454e30b31e
fix(experiments): Don't override properties (#11119)
* fix(experiments): Don't override properties

* fix

* update

* recover other test too
2022-08-03 18:37:42 +01:00
Neil Kakkar
4466212c83
fix(experiments): Manually filter out variants (#11115)
* fix(experiments): Manually filter out variants

* make test case more brittle
2022-08-03 16:29:01 +01:00
Neil Kakkar
9fbf83ad19
chore(feature-flags): Use feature flag instead of instance setting fo… (#11092)
* chore(feature-flags): Use feature flag instead of instance setting for person on events

* fix tests where timezone flag was removed

* remove arg
2022-08-02 16:11:16 +01:00
timgl
3f62f01d5f
fix(tests): Fix circular import when running local tests (#11028) 2022-07-28 21:28:51 +01:00
Eric Duong
8e0752c21d
fix: Remove excess intervals (#10992)
* fix: don't extend interval

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* fix: update snapshot

Co-authored-by: EDsCODE <EDsCODE@users.noreply.github.com>
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
Co-authored-by: timgl <tim@glsr.nl>
Co-authored-by: timgl <timgl@users.noreply.github.com>
2022-07-28 12:12:50 -04:00
Harry Waye
aefc3ab0f2
fix(persons): make sure "uuid" returned in person response (#10911)
* fix(persons): make sure "uuid" returned in person response

We reference this in a few places but it was omitted from the response
by https://github.com/PostHog/posthog/pull/10868/files

This simply adds it back in.

Relates to the issue mentioned in Slack
[here](https://posthogusers.slack.com/archives/C01GLBKHKQT/p1658349671498709)

* only add to persons serializer, avoid changes to groups

* Update snapshots

* add uuid to group response test

Co-authored-by: hazzadous <hazzadous@users.noreply.github.com>
2022-07-21 13:41:59 +00:00
Neil Kakkar
6c04bfad04
fix(experiments): Show experiment feature flags in list (#10654) 2022-07-20 12:59:26 +00:00
timgl
d0ae76d6f1
perf(Persons): Use clickhouse for person endpoint (#10868)
* perf(Persons): Use clickhouse for person endpoint

* update api

* Use uuids everywhere

* fix cohort id

* Update snapshots

* Update snapshots

* fix api

* fix order by

* Update snapshots

* Update snapshots

* fix api

* fix api

* Update snapshots

* fix ordering

* Update snapshots

* Update snapshots

* fix nits

* Update snapshots

Co-authored-by: timgl <timgl@users.noreply.github.com>
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2022-07-20 12:07:01 +00:00
Neil Kakkar
1f7f48486b
fix(funnels): Treat events with the same timestamp as in order (#10540) 2022-07-19 14:44:48 +01:00
Neil Kakkar
fce85484ff
feat(lifecycle): Lifecycle persons on events (#9880) 2022-07-13 10:54:06 +00:00
Eric Duong
c29504ed01
fix(cohort): cohort performed event multiple overwriting param (#10746)
* fix: cohort performed event multiple overwriting param

* fix: change test name
2022-07-12 17:58:40 +00:00
Rick Marron
f4f178e859
fix(session-analysis): add sessions to the glabal property filters on trends and fix column disambiguation (#10700)
* fix(session-analysis): add sessions to the glabal property filters on trends

* fix more session_id disambiguation

* add test

* move to array deconstruction
2022-07-08 19:49:58 +00:00
Neil Kakkar
f8090bd538
fix(breakdowns): Use an upper bound for histogram properties (#10663) 2022-07-07 10:22:11 -07:00
Neil Kakkar
1e207230ba
feat(trends): Allow histogram breakdowns for numeric values (#10606) 2022-07-06 16:38:37 +00:00
timgl
bed68d0b3b
perf(retention): Improve retention speed by removing uuid (#10636)
* perf(retention): Improve retention speed by removing uuid

* Update snapshots

* Update snapshots

Co-authored-by: timgl <timgl@users.noreply.github.com>
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2022-07-05 12:02:03 +01:00
Neil Kakkar
75397a8c68
feat(session-analysis): Enable math operations for session properties (#10537) 2022-07-01 10:52:14 +01:00
Rick Marron
9f06e750cb
feat(session-analysis): breakdown by session duration (#10522)
* breakdown by session duration

* typings

* behind ff

* handle exact operator

* feature flag works

* add tests

* fix test for exact operator

* better test

* remove log

* Update snapshots

* add test for unique session breakdown

Co-authored-by: rcmarron <rcmarron@users.noreply.github.com>
2022-06-30 08:47:34 -07:00
Ben White
f4e64b07a5
feat(sharing): Insight Sharing / Embedding (#10536)
* Added SharingConfiguration
* Added SharingModal for Insights
* Simplified insight permission check
* Merged sharing/exports/embed into one view
* Removed share_token usage wherever possible

Co-authored-by: Marius Andra <marius.andra@gmail.com>
Co-authored-by: benjackwhite <benjackwhite@users.noreply.github.com>
2022-06-30 11:58:58 +00:00
Rick Marron
f0dea6eb49
fix(recordings): use prewhere to speed up query (#10575)
* fix(recordings):use prewhere to speed up query

* Update snapshots

Co-authored-by: rcmarron <rcmarron@users.noreply.github.com>
2022-06-29 20:40:16 +00:00
Rick Marron
79183fde44
fix(session-analysis): multiple duration filters (#10549)
* fix(session-analysis): multiple duration filters

* add tests
2022-06-29 18:10:14 +00:00
Neil Kakkar
0ff4d7ed5d
fix(property-filters): Make value optional on the backend (#10560) 2022-06-29 16:28:48 +00:00
Guido Iaquinti
c51b08b946
fix(misc): remove variable allocation when not needed (part #3) (#10508)
* fix(misc): remove variable allocation when not needed (part #3)

* fix(misc): remove variable allocation when not needed (part #3)
2022-06-27 19:26:09 +02:00
Guido Iaquinti
698baf61db
fix(misc): remove variable allocation when not needed (part #2) (#10502) 2022-06-27 12:21:01 +02:00
Ben White
1484b846ce
feat(subscriptions): Add Slack Subscriptions (#10388)
* Added slack configuration options
* Added slack selection UI
2022-06-24 10:29:45 +02:00
Eric Duong
666808c75d
refactor(FOSS): Split out cohort functionality (#10387)
* refactor: foss move properties to /posthog

* refactor: move replication and materializtaion

* refactor: move file

* refactor: move test and journeys

* refactor: move breakdown props

* refactor: move query imports

* refactor: move more ee dependencies

* refactor: restore groupsjoinquery

* fix: errors

* refactor: no ee.clickhouse dependncies

* try import tasks

* refactor: move materialization

* refactor: change foss split for column optimizer

* run black

* fix: imports

* remove comment

* Update snapshots

* run black

* skip isort

* Update snapshots

* format

* more fixes

* refactor: move migrations

* refactor: move idl

* fix: move more imports

* import adjustments

* fix: test import

* fix: test import

* fix: remove restriction

* refactor: split out paths query code

* refactor: more code splitting

* fix: types

* refactor: split out cohort functionality

* refactor: import

* refactor: move negations

* refactor(FOSS): split out paths query code (#10378)

* refactor: move migrations

* refactor: move idl

* fix: move more imports

* import adjustments

* fix: test import

* fix: test import

* fix: remove restriction

* refactor: split out paths query code

* refactor: more code splitting

* fix: types

* refactor(FOSS): Setup such that FOSS is deployable (#10352)

* refactor: move migrations

* refactor: move idl

* fix: move more imports

* import adjustments

* fix: test import

* fix: test import

* fix: remove restriction

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-23 11:34:46 -04:00
Rick Marron
8a23be18dc
feat(session-analysis): Enable filtering by session length (#10356)
* it works

* add to group filters

* add feature flag

* add support for insight panels

* add backend tests

* add frontend tests

* Update snapshots

* type fixes

* fix cypress

* paramaterize team_id

* clean up FF

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-23 08:05:45 -07:00
Eric Duong
2367289918
fix(person modal): Entity ambiguity (#10289)
* fix: person modal entity ambiguity

* fix: add test

* add field to stickiness

* test both labels

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2022-06-23 10:41:23 -04:00
Karl-Aksel Puulmann
d989364a4c
fix(data-integrity): use person.version column in queries (#10403)
* fix(data-integrity): use `person.version` column in queries

Solves: https://github.com/PostHog/posthog/issues/10244

Related: https://github.com/PostHog/posthog/issues/10208

In https://github.com/PostHog/posthog/pull/10117 tiina exposed the
`version` column for person clickhouse tables, but queries were not
updated.

Ideally we deploy this after
https://github.com/PostHog/posthog/pull/10355 has been deployed which
avoids issues with pre-existing multiple-version-zero rows.

For self-hosted we should encourage people to run this async migration
asap.

* Update snapshots

* Update snapshots

* Update snapshots

* Update RECALCULATE_COHORT_BY_ID

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-23 13:58:31 +03:00