0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 12:21:02 +01:00
Commit Graph

1267 Commits

Author SHA1 Message Date
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
Ben White
c835a30ee0
fix: Export issues (#10625)
* Add retries to image exporting
* Tried to remove shm usage for higher reliability
* Fixed next_delivery_date to only be reset if the rrule changes
2022-07-04 14:52:50 +00:00
Ben White
dbf3b5264d
fix: Slack unfurl alternative args (#10610) 2022-07-01 15:48:51 +00:00
Ben White
2390759d48
fix: Slack event timestamp (#10605)
* fix: Slack event timestamp
2022-07-01 14:32:39 +00:00
Ben White
87c948457e
fix: Slack timing header not being parsed correctly (#10603) 2022-07-01 12:34:36 +00:00
Ben White
fdbf1580f4
feat: Added Slack link unfurling (#10587)
* Added slack signature validation

Co-authored-by: Paul D'Ambra <paul@posthog.com>
2022-07-01 12:07:15 +02:00
Neil Kakkar
75397a8c68
feat(session-analysis): Enable math operations for session properties (#10537) 2022-07-01 10:52:14 +01:00
Paul D'Ambra
18c5927f57
fix: celery autoimport was ignoring CSV exports (#10586)
* launch celery with debug logging

* autoimport a single task which decides what type of export to run

* still need to manually inject root folder so tests can clear up

* fix mock
2022-06-30 17:42:28 +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
Paul D'Ambra
c8dd7b0244
feat: export lists of events to CSV (backend only) (#10510)
* sketch the interaction

* correct field type

* explode a filter to steps of day length

* write to object storage maybe

* very shonky storing of gzipped files

* doesn't need an export type

* mark export type choices as deprecated

* order methods

* stage to temporary file

* can manually export the uncompressed content

* shonkily export as a csv

* wip

* with test for requesting the export

* with polling test for the API

* put existing broken CSV download back before implementing UI change

* open api change

* even more waffle

* less passive waffle

* sometimes less specific is more correct

* refactor looping

* okay snapshots

* remove unused exception variable

* fix mocks

* Update snapshots

* Update snapshots

* lift storage location to the exported asset model

* split the export tasks

* improve the temp file usage in csv exporter

* delete the test files we're creating

* add a commit to try and trigger github actions

Co-authored-by: pauldambra <pauldambra@users.noreply.github.com>
2022-06-28 20:05:37 +02:00
Ben White
d044b729b2
fix: Individual exporting of dashboard insight to use correct config (#10524)
* fix: Individual exporting of dashboard insight to use correct config
2022-06-28 14:54:18 +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
Eric Duong
bf81161e7f
refactor: Fix periodic tasks (#10491)
* Revert "fix: Fix ee celery tasks (#10481)"

This reverts commit 5b3fbbd57b.

* chore: empty

* fix: move ee tasks to celery.py

* chore: empty

* remove file

* remove init
2022-06-24 13:52:32 -04:00
Eric Duong
8c6923a0e0
fix: Revert "fix: Fix ee celery tasks" (#10487)
* Revert "fix: Fix ee celery tasks (#10481)"

This reverts commit 5b3fbbd57b.

* chore: empty
2022-06-24 15:58:37 +00:00
Ben White
5b3fbbd57b
fix: Fix ee celery tasks (#10481)
* fix: Fix ee celery tasks
2022-06-24 17:03:26 +02:00
Alex Gyujin Kim
8da7cf9a2a
feat(data-management): rename actions to events frontend (#10139)
* first take

* add columns

* replace actions with events

* all actions to events

* attempt to add backend tests

* create merged event_definition and action sql

* rename calculated events to events and events to raw events

* remove all frontend changes

* reformat

* flake

* Revert "remove all frontend changes"

This reverts commit ccae916ed1.

* add action fields

* edge cases

* fossify

* bring where conditions into subquery

* bring order into query

* revert organization

* ci

* fix: remove enterpriseeventdefinition and enterprisepropertydefintion from barrel file to be foss compatible

* unfossify

* imports

* fix imports

* fix tests

* fix wrong test case

* mypy

* fix tests

* fix mypy

* prettify

* fix mounting order of logics

* address feedback and fix action ordering bug

Co-authored-by: eric <eeoneric@gmail.com>
2022-06-24 14:26:31 +00:00
Ben White
925a54b5ad
feat: Slack Invite message (#10478)
* feat: Slack Subscription Invites
2022-06-24 15:18:34 +02:00
Karl-Aksel Puulmann
773f922eef
feat(apps): Remove onAction plugin function (#10414)
* Remove onAction

* Avoid fetching actions that dont deal with REST - 99% reduction

* Plural hooks

* Avoid hook fetching where not needed

* Remove dead code

* Update lazy VM test

* Rename a function

* Update README

* Explicit reload actions in tests

* Only reload actions which are relevant for plugin server

* Remove excessive logging

* Reload actions when hooks are updated

* update action matching tests

* Remove commented code

* Solve naming issues
2022-06-24 12:29:10 +03: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
cb485164f7
refactor(foss): materialize and celery (#10434)
* 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(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

* fix import

* refactor: add snapshost

* subscription-import

* refactor: new file

* fix: remove unused

* use app object import

* Update snapshots

* ensure same app is used

* use decorator

* remove file

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-23 20:17:39 -04:00
Alex Gyujin Kim
446028beb9
chore: remove deprecated tags fields (#10280)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-23 16:53:35 +00: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
Eric Duong
46faa8fab2
refactor(FOSS): foss remove all ee dependencies from /posthog (#10319)
* 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(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

* fix import

* refactor: add snapshost

* subscription-import

* fix: safe import

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 17:24:03 -04:00
Rick Marron
06c7c0a0fe
fix(session-analysis): dollar sign columns were erroring out formula queries (#10395)
* fix(session-analysis): dollar sign columns were erroring out formula queries

* better fix

* Update snapshots

* fix test

* Update snapshots

* clean up columns

* whelp, this is simpler

* oops

* revert some more

* update snapshots

* a bit simpler

* Update snapshots

* Update snapshots

* Update snapshots

* okkkkk - fixed + tested

* Update snapshots

* Update snapshots

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 10:26:50 -07:00
Ben White
998b92dbb5
fix: Subscriptions - removed duplicate receiver (#10419) 2022-06-22 13:37:01 +00:00
Ben White
aafcbf0b4d
fix: Moved most subscriptions code to EE (#10411)
* fix: Moved most subscriptions code to EE
* Fixed Storybook for Subscriptions
2022-06-22 14:26:13 +02:00
Rick Marron
dad8181db9
feat(session-analysis): Unique sessions (#10380)
* it works

* add some tests

* toss it behind a ff
2022-06-21 09:13:36 -07:00
Michael Matloka
2e155609d1
chore: Drop and recreate test CH DB in setup_test_environment (#10368) 2022-06-21 11:39:00 +02:00
Paul D'Ambra
68473905c5
chore: refactor session recording tests setup (#10347) 2022-06-20 17:40:11 +02:00
Karl-Aksel Puulmann
5702e42716
chore(ci): Speed up setup_test_environment (#10353)
* Update test_schema.py

* Create DLQ kafka table only for relevant tests

* Remove DLQ mv tables from conftest

* Standardize conftest

* Parallel clickhouse setup

* Create django db based on models

Speeds up django test database setup from ~15s to 1s.

* Update imports

* Re-add conditionality, fix typing

* Run plugin-server tests when this file changes
2022-06-20 16:31:25 +03:00
Alex Gyujin Kim
06f96fa648
chore(data-management): make event definition list api action compatible (#10298)
Co-authored-by: eric <eeoneric@gmail.com>
2022-06-17 15:18:41 +00:00
Eric Duong
89f612f84e
refactor: foss property util (#10318)
* refactor: foss move properties to /posthog

* refactor: move file
2022-06-17 09:31:54 -04:00
Eric Duong
7ac6efd839
refactor: move event util (#10108)
* refactor: move event util

* fix delete tests

* address comments

* test cloud import

* make absolute

* test cloud

* revert
2022-06-15 16:03:43 -04:00
Eric Duong
cb68eec23b
fix: caching remove flaky test (#10312)
* fix: remove flaky test

* chore: empty
2022-06-15 17:14:37 +01:00
Neil Kakkar
dee5eac9c4
fix(cohorts): Coerce property types for default events as well (#10279)
* fix(cohorts): Coerce property types for default events as well

* fix tests

* fix tests
2022-06-15 10:31:11 +01:00
Eric Duong
8f33e2924d
refactor: strict cache block (#10302)
* fix: disable breakdowns

* block formula

* refactor: only use on linear trends
2022-06-14 18:05:05 -04:00
Eric Duong
b684743464
fix(strict-caching): adjust logic and add better checks (#10300)
* fix: adjust logic and add better checks

* chore: empty

* more tests and handle all cases

* fix: types

* Update snapshots

* Update snapshots

* remove snapshots

* Update snapshots

* remove snapshots

* add comment

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-14 16:38:00 -04:00
Eric Duong
733db4c6bb
refactor: use cache for historical data (#10267)
* initial working

* initial working

* adjust args

* refactor: remove test changes

* refactor: uncomment

* remove junk

* fix: cleanup

* add test

* order of params

* fix tests

* Update snapshots

* fix typing

* add condition

* fix: cleanup

* fix: cleanup

* Update snapshots

* fix flag

* change snapshots

* change date

* add tests on merge results

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-14 12:05:21 -04:00
Karl-Aksel Puulmann
6cac80811a
feat: delete team data from clickhouse on a cron (#10191)
* fix: dont OOM deleting large teams/organizations

Another issue plaguing team deletion was that django ORM loads all
objects for a team into memory. If a team had >200k people, that would
cause the process to fail.

We now instead delete via a single sql statement.

* Change crontab parsing logic

* Cron for deleting clickhouse data

* Delete data conditionally

* Add schedule to tasks
2022-06-14 12:24:38 +03:00
Eric Duong
e8d4d6d49d
refactor(foss): move all /sql queries (#10230)
* refactor: move prop value and actorbasequery files

* refactor: move test base

* fix: imports

* move middleware

* refactor: move cohort model util

* refactor: move all /sql queries

* fix: imports

* fix imports

* refactor: move cohort model util (#10224)
2022-06-13 18:05:14 -04:00
Eric Duong
ce7988ecfa
refactor: move prop value and actorbasequery files (#10258)
* Revert "fix: revert "move prop value and actorbasequery files" due to flaky test (#10257)"

This reverts commit ac1a485cdf.

* chore: empty
2022-06-13 16:24:14 -04:00
Eric Duong
ac1a485cdf
fix: revert "move prop value and actorbasequery files" due to flaky test (#10257)
* Revert "refactor: move prop value and actorbasequery files (#10220)"

This reverts commit 12bf3a7c3e.

* chore: empty
2022-06-10 23:49:53 +00:00
Eric Duong
12bf3a7c3e
refactor: move prop value and actorbasequery files (#10220)
* refactor: move prop value and actorbasequery files

* refactor: move test base

* fix: imports

* move middleware

* refactor: move cohort model util (#10224)
2022-06-10 18:44:50 -04:00
Marius Andra
a0141287d3
fix(login): reset session when logging in via sso (#10252)
* fix(login): sso auth session clearing

* flyby fix

* add a test for this

* move to ee tests
2022-06-10 19:07:11 +02:00
Karl-Aksel Puulmann
846cf1e02e
fix: Quote ON CLUSTER on DLQ migration (#10235)
Fixes https://github.com/PostHog/posthog/issues/10233
2022-06-10 13:17:20 +03:00
Eric Duong
e5df72b4be
refactor: foss trends (#10206)
* refactor: move files

* refactor: variable naming

* factory pattern

* fix: restore exceptions hog

* remove factory pattern

* refactor: move files and change insight class

* move sql

* types

* fix imports

* fix imports

* refactor: propogate class

* fix import

* refactor: move paths to /posthog

* change imports for clickhousepathsactors

* change order

* fix: restructure imports

* fix imports

* move tests

* add dependency

* remove deprecated

* move tests

* inherit foss tests

* refactor: split stickiness /posthog and /ee (#10085)

* refactor: move files

* refactor: variable naming

* factory pattern

* fix: restore exceptions hog

* remove factory pattern

* fix imports

* fix import

* move test paths

* restore factory pattern

* add mixin

* change imports

* refactor: move funnels and split according to foss

* ignore type on init

* fix: bad import

* refactor: foss trends

* fix: missing import

* fix: missing import

* Update snapshots

* split tests

* move mixin

* move import and snapshot

* fix test

* fix: test

* fix comparison

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-09 17:39:32 +00:00
Eric Duong
3dd2e14297
refactor: restore retention test factory (#10200)
* refactor: restore test factory

* chore: empty
2022-06-09 13:26:37 -04:00
Eric Duong
9adfaaaba6
refactor: move path query class from /ee to /posthog (#10140)
* refactor: move files

* refactor: variable naming

* factory pattern

* fix: restore exceptions hog

* remove factory pattern

* refactor: move files and change insight class

* move sql

* types

* fix imports

* fix imports

* refactor: propogate class

* fix import

* refactor: move paths to /posthog

* change imports for clickhousepathsactors

* change order

* fix: restructure imports

* fix imports

* move tests

* add dependency

* remove deprecated

* move tests

* inherit foss tests

* refactor: split stickiness /posthog and /ee (#10085)

* refactor: move files

* refactor: variable naming

* factory pattern

* fix: restore exceptions hog

* remove factory pattern

* fix imports

* fix import

* move test paths

* restore factory pattern

* add mixin

* change imports

* refactor: Foss funnels (#10204)

* refactor: move funnels and split according to foss

* ignore type on init

* fix: bad import
2022-06-09 15:09:00 +00:00
Eric Duong
c0ccc1fef8
fix: cohort update to original bug 2 (#10130)
* fix: add test for updating back to original

* fix: add test for updating back to original

* add uuid column to cohortpeople

* Update snapshots

* add migration

* remove random uuid

* Update snapshots

* add recalculation condition

* fix: tests working

* adjust tests

* add swapover test

* wrong var

* wrong param

* remove default

* Update snapshots

* Update snapshots

* refactor: sql

* accepted tables in test

* update tests

* don't alias otherwise condition is misled

* use more inclusive operator

* address comments

* fix: use column solution

* fix: group by version

* fix: add sort key modification

* fix: add comma

* Update snapshots

* Update snapshots

* update snapshots

* remove leftover

* remove stale test

* update snapshots

* add comment

* add test

* add version to count clause

* Update snapshots

* Update snapshots

Co-authored-by: Rick Marron <rcmarron@gmail.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-07 14:36:28 -04:00
Michael Matloka
cd334288d0
refactor(utils): create_group_ch out of create_group (#10155)
* refactor(utils): `create_group_ch` out of `create_group`

* Prevent misuse
2022-06-07 17:57:49 +00:00
Eric Duong
e61b23cbcc
refactor: move retention query class from /ee to /posthog (#10137)
* refactor: move files and change insight class

* move sql

* types

* fix imports

* refactor: propogate class

* change order

* fix: restructure imports

* fix imports

* move tests

* add dependency

* remove deprecated

* inherit foss tests

* refactor: split stickiness /posthog and /ee (#10085)

* refactor: move files

* refactor: variable naming

* factory pattern

* fix: restore exceptions hog

* remove factory pattern

* fix imports

* fix import

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-07 12:52:45 -04:00
Tiina Turban
26435cb70d
feat: Add version column to person in CH (#10117) 2022-06-06 13:42:39 +02:00
Neil Kakkar
4431c09f22
feat(funnels): breakdown by first-touch (and other) properties (#10062) 2022-06-06 11:37:58 +01:00
Michael Matloka
3624a5ce9c
feat(demo): Make demo more robust (#10098)
* Add `min-width` to `SitePopover`

* Add "you" as a special case of a `ProfilePicture` user name

* Add a funnel to Hedgebox data

* Open demo signup CTA in new tab

* Provide all paid feature in demo

* Add nbsp;s on signup pages

* Align simulate_matrix defaults with demo signin

* Automate taxonomy generation in Matrix

* Register first seen and last seen dates for events

* Improve naming

* Improve `run_on_team` return type

* Copy data from master team for performance

* Add type annotations

* Fix Postgres analytics data

* Support groups in demo data

* Silence logspam

* Divide clusters into company and social ones

* Fix `calculate_event_property_usage_for_team`

* Add `COPY_ROWS_BETWEEN_TEAMS_BASE_SQL` const
2022-06-03 20:17:15 +02:00
Eric Duong
4c3e713177
refactor: move persons util (#10079)
* refactor: move persons /clickhouse to /posthog

* remove leak

* fix: patch

* move import

* remove imports
2022-06-01 16:26:11 -04:00
Eric Duong
0dcf766a65
refactor: move team util to /posthog (#10077)
* refactor: move team util

* refactor: move team util

* restructure file
2022-06-01 18:19:03 +00:00
Neil Kakkar
50ab936a06
fix(cohorts): Fix person on events tests (#10106)
* fix(cohorts): Fix person on events tests

* better test
2022-06-01 14:03:25 -04:00
Eric Duong
bc3ab45fdd
refactor: move element util to /posthog (#10075)
* refactor: move element util

* chore: empty

* refactor: move entity util
2022-06-01 11:04:11 -04:00
Eric Duong
79f32fdaae
refactor: move entity util (#10076)
* refactor: move entity util

* chore: empty

* circular import

* change folder structure
2022-06-01 11:03:51 -04:00
Neil Kakkar
839d8cc03a
feat(cohorts): Enable person-on-events for new cohorts (#10037)
* feat(cohorts): Enable person-on-events for new cohorts

* address comment
2022-06-01 14:46:20 +01:00
Eric Duong
5b789f2210
chore: release new cohort query backend (#10049)
* Revert "chore: revert release new cohort query backend (#10024)"

This reverts commit cfaf942739.

* chore: empty
2022-05-31 10:39:30 -04:00
Michael Matloka
a29bdc014f
chore(schema): Delete Postgres PluginLogEntry model and table (#9944)
* Remove old plugin logs removal Celery task

* Remove `PluginLogEntry` Django model
2022-05-31 12:26:01 +02:00
Michael Matloka
64317238e6
refactor: Eliminate the KAFKA_ENABLED setting (#10059)
* refactor: Eliminate the `KAFKA_ENABLED` setting

* Remove dead code

* Consolidate plugin server test scripts and CI

* Fix CI command

* Remove Celery queues

* Rearrange test directories

* Update import paths
2022-05-30 18:39:33 +00:00
Paul D'Ambra
415dfdd877
fix: do not delete experiment on soft deleting flags (#10047) 2022-05-30 17:27:44 +01:00
Neil Kakkar
304b51ec0e
fix(breakdowns): Make paging order stable (#10050) 2022-05-30 16:22:30 +01:00
Karl-Aksel Puulmann
5dba6f1fd4
fix: Don't write to old distinct_id topic (#10055)
This was being written to by demo data generation code
2022-05-30 15:17:54 +03:00
Ben White
57874f9db2
feat(exports): Dashboard / Insight exporting (#9830)
* Adds chromium / selenium for image exporting
* Added uploading of downloads folder to artefacts
* Adds ExportButton to generate desired asset
2022-05-27 14:31:17 +02:00
Paul D'Ambra
de56d0bac0
fix: don't allow hard deletes on models with a soft delete option (#10018)
* delete insight to dashboard relation on soft delete of either

* refactor tests

* obey mypy

* don't allow hard delete of insights or dashboards

* soft deleted insights return 404 on get

* prove soft delete can be reversed

* no need to test permissions on delete that nobody can do

* no need to test permissions on delete that nobody can do

* don't allow hard delete on cohort

* don't allow annotation deletion

* don't allow hard deletion of actions

* undelete snapshot :/

* don't allow hard deletion of feature flag

* soft delete feature flag deletes experiments
2022-05-27 10:20:11 +01:00
Paul D'Ambra
bb0872b7dd
fix: soft or hard delete insight after soft or hard dashboard deletion (#9998)
* delete insight to dashboard relation on soft delete of either

* refactor tests

* obey mypy

* don't allow hard delete of insights or dashboards

* soft deleted insights return 404 on get

* prove soft delete can be reversed

* no need to test permissions on delete that nobody can do

* no need to test permissions on delete that nobody can do
2022-05-27 09:15:53 +01:00
Eric Duong
cfaf942739
chore: revert release new cohort query backend (#10024)
* Revert "chore: release new cohort query backend (#10003)"

This reverts commit 1632c436af.

* chore: empty
2022-05-26 20:13:28 +00:00
Rick Marron
bde8b29d73
chore(tests): flix flaky dead letter queue tests (#10022)
* chore(tests): flix flaky dead letter queue tests

* use DEAD_LETTER_QUEUE_TABLE`
2022-05-26 19:20:17 +00:00
Eric Duong
1632c436af
chore: release new cohort query backend (#10003)
* release: new cohort query backend

* chore: deep prune

* Update snapshots

* don't remove override test

* Update snapshots

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-26 12:34:47 -04:00
Neil Kakkar
52252e0e1c
feat(correlation): Enable person-on-events querying (#9952) 2022-05-26 17:01:15 +01:00
Eric Duong
28c874e2c3
feat(person-on-events): Person on events paths (#9893) 2022-05-26 11:59:00 +00:00
Rick Marron
206790e9b9
fix(sso): add org creation confirmation screen (#9875)
* fix(sso): add org creation confirmation screen

* rev on page

* bugz

* bug fixers

* fix test

* add tests

* add a bit of logging

* styling

* cleanup

* style tweaks

* fix bug

* add some tests

* typing fix
2022-05-25 16:42:02 -07:00
Eric Duong
52f68a9daa
feat(person-on-events): Person on events funnels (#9822) 2022-05-25 13:19:58 +01:00
Tim Glaser
9fb614943c
feat: Launch timezones for everyone (#9911)
* feat(insights): Launch timezones for everyone

* chang text

* fix typescript

* fix timezones

* fix timezones

* Rename timezone_For_charts

* revert comment
2022-05-25 12:56:10 +01:00
Neil Kakkar
3b8ecaa26f
fix(clickhouse): Set optimize setting to ensure ilike works (#9948) 2022-05-25 12:52:08 +01:00
Harry Waye
1ed90be556
chore(kafka): support KAFKA_PREFIX, enable using basic Heroku Kafka (#9941)
* chore(kafka): support `KAFKA_PREFIX`, enable using basic Heroku Kafka

Kafka on Heroku multi-tenented instances requires that all topics have a
prefix. See
https://devcenter.heroku.com/articles/multi-tenant-kafka-on-heroku#differences-to-dedicated-kafka-plans
for details.

* Move KAFKA_PREFIX
2022-05-24 16:00:19 +01:00
Neil Kakkar
5e09eba801
feat(retention): Enable person on events querying for retention (#9858)
* add constance setting

* add minimum viable code

* update journeys_for

* working test case

* chore: remove eventserializer in unnecessary places

* change execution

* change imports

* fix typing and tests

* change format

* adjust

* reset

* split group path in trend breakdown

* fix: typing

* fix test

* fix test, rename

* automatically add persons to events in tests on flush

* test CI with person-on-events

* wip

* fix

* fix ci

* add comma

* reduce test explosion

* fix CH server image version #9743

* update conditional

* split person on events

* split person on events

* split properly

* fix test deps

* add persons on events for tests

* rm eventserializer changes

* upd

* fix tests

* streamline person on event tests

* remove cache dependence, even after dematerialization deletion

* disregard snapshot tests

* no casting for matrix variables

* fix actions problems

* try to limit blast radius

* Update snapshots

* why are these tests passing?

* stoopid

* fix trend tests

* fix more trend tests, add test for old query regression

* Update snapshots

* optimise persons

* feat(retention): Enable person on events querying for retention

* update snaps

* Update snapshots

* Update snapshots

* fix tests

Co-authored-by: eric <eeoneric@gmail.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-23 16:24:17 -04:00
Eric Duong
351b311733
fix(event-list): add order by statement to select (#9923)
* fix: add order by statement to select

* fix: remove toDate(timestamp)
2022-05-23 13:03:51 -07:00
Neil Kakkar
60c0ddfb1a
feat(stickiness): Enable querying with person on events (#9884) 2022-05-23 15:00:04 +01:00
Eric Duong
df17af3d1e
feat(person-on-events): Person on events trends (#9645) 2022-05-23 10:26:14 +01:00
Neil Kakkar
4666d38b62
chore: Fix snapshots on master (#9885) 2022-05-20 16:24:03 +01:00
Karl-Aksel Puulmann
3412eed230
refactor: Remove constance library dependency, use json-encoded model (#9852)
* Populate the new model

* Add constance to admin

* Handle table not existing

* Add model tests

* Add tests for the constance model

* Fixup migrations

* Update instance settings to use new constance model

* update most readings

* Use override method in some tests

* Improve typing

* Prettier

* Merge 233 migration

* Order imports

* Fixup

* Update some query counts

* Remove dead import

* Improve some mypy

* Update team.py

* Remove constance library

* Mark migration as non-atomic

* Instance settings cleanup

* Rename methods to be more consistent

* Fixup for migration

* Update tests
2022-05-20 15:12:37 +03:00
Harry Waye
d1ffdf0a7f
chore(clickhouse): avoid creating kafka_events, events_mv (#9863)
To avoid needing to run ClickHouse with protobuf support, I am changing
the migrations to not create the kafka_events table. Older installs will
still have these tables however.
2022-05-20 11:07:57 +00:00
Tim Glaser
967b50c3a0
fix(insights): Fix timezone date issues (#9678)
* fix(insights): Fix timezone date issues

* fix formatting

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix typescript

* Add snapshots for timezone tests

* Update snapshots

* fix with_data issue

* Update snapshots

* Update snapshots

* fix date_to and fix retention

* Fix retention

* Update snapshots

* Always set hourly intervals to 23:59:59, unless no date is given

* Update snapshots

* try always passing hourly through

* ifix

* fix

* fix mayb

* other fix

* fix

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-20 11:17:16 +01:00
Michael Matloka
faf75ebb5e
refactor(ingestion): Make KAFKA_ENABLED true by default and set KAFKA_HOSTS default (#9844)
* refactor(ingestion): Make `KAFKA_ENABLED` true by default

* Sync `KAFKA_HOSTS` defaults too

* Update snapshots

* Update "kafka" to "kafka:9092"

* Revert "Update "kafka" to "kafka:9092""

This reverts commit d954ac6fa6.

* Update some tests

* Revert "Revert "Update "kafka" to "kafka:9092"""

This reverts commit 07edfa6c5e.

* Update test_0004_replicated_schema.ambr

* Remove `KAFKA_ENABLED` and `KAFKA_HOSTS` from places

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-19 19:18:15 +02:00
Marcus Hyett (PostHog)
0305c4ac5b
feat(whitelabel-shared-dashboard): Hide branding on shared dashboards paid (#9849)
* Ability to hide branding on shared dashboards for paid organizations

* Fix ts formatting

* added white labeling to min plan type
2022-05-20 02:04:41 +10:00