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

1740 Commits

Author SHA1 Message Date
Tim Glaser
88c54896d0
Fix person querying (#1797)
* convert sessions table logic to TS

* convert rest of sessions to TS

* sessions table logic refactor, store date in the url

* add back/forward buttons

* load sessions based on the URL, not after mount --> avoids duplicate query if opening an url with a filter

* prevent multiple queries

* throw error if failed instead of returning an empty list

* date from filters

* rename offset to nextOffset

* initial limit/offset block

* indent sql

* support limit + offset

* load LIMIT+1 sessions in postgres, pop last and show load more sign. (was: show sign if exactly LIMIT fetched)

* based offset is always 0

* default limit to 50

* events in clickhouse sessions

* add elements to query results

* add person properties to sessions query response

* show seconds with two digits

* fix pagination, timestamp calculation and ordering on pages 2 and beyond

* mypy

* fix test

* add default time to fix test, fix some any(*) filter issues

* remove reverse

* WIP event list

* Events progress

* Finish off event listing, skip live actions for now

* Fix mypy

* Fix mypy again

* Try fixing mypy

* Fix assertnumqueries

* Fix tests

* Fix tests

* fix test

* Fix tests

* Fix tests

* Fix tests again

* Fix person querying

* Fix flake

* Fix person stuff

* Fix test

Co-authored-by: Marius Andra <marius.andra@gmail.com>
Co-authored-by: Eric <eeoneric@gmail.com>
2020-10-02 19:30:05 +02:00
Paolo D'Amico
e0de7795a0
Self-serve billing enrollment & management (#1721) 2020-10-02 16:20:24 +01:00
James Greenhill
b60b08f281
Add python version to posthog for automated deploys (#1795) 2020-10-02 08:54:20 +01:00
Tim Glaser
095dca9e97
Always limit events (#1794)
* Fix ambiguous timestamp ordering

* Always limit events
2020-10-01 18:13:32 +02:00
Tim Glaser
64a5ad7c9a
Fix ambiguous timestamp ordering (#1792) 2020-10-01 16:48:25 +02:00
Tim Glaser
73f327a13f
Fix dev docker build (#1791) 2020-10-01 16:24:43 +02:00
Yakko Majuri
059f3325b5
Create CODE_OF_CONDUCT.md (#1790) 2020-10-01 14:12:10 +00:00
Tim Glaser
92e8bbd283
[Clickhouse] Event list (#1787)
* convert sessions table logic to TS

* convert rest of sessions to TS

* sessions table logic refactor, store date in the url

* add back/forward buttons

* load sessions based on the URL, not after mount --> avoids duplicate query if opening an url with a filter

* prevent multiple queries

* throw error if failed instead of returning an empty list

* date from filters

* rename offset to nextOffset

* initial limit/offset block

* indent sql

* support limit + offset

* load LIMIT+1 sessions in postgres, pop last and show load more sign. (was: show sign if exactly LIMIT fetched)

* based offset is always 0

* default limit to 50

* events in clickhouse sessions

* add elements to query results

* add person properties to sessions query response

* show seconds with two digits

* fix pagination, timestamp calculation and ordering on pages 2 and beyond

* mypy

* fix test

* add default time to fix test, fix some any(*) filter issues

* remove reverse

* WIP event list

* Events progress

* Finish off event listing, skip live actions for now

* Fix mypy

* Fix mypy again

* Try fixing mypy

* Fix assertnumqueries

* Fix tests

* Fix tests

* fix test

* Fix tests

* Fix tests

* Fix tests again

Co-authored-by: Marius Andra <marius.andra@gmail.com>
Co-authored-by: Eric <eeoneric@gmail.com>
2020-10-01 15:47:35 +02:00
Yakko Majuri
b58ed0657a
made shared_dashboards endpoint exempt from x-frame-options header (#1789) 2020-10-01 13:05:17 +00:00
James Greenhill
46f72ba2c8
Search for cohorts that contain the given distinctIDs for feature flags (#1780)
* Search for cohorts that contain the given distinctIDs for feature flags

* remove unused file

* add tests

* finalize tests

* clean up unneeded imports

* fix garbage name
2020-10-01 05:41:40 -04:00
Marius Andra
80a699ef4e
Clickhouse Sessions + Frontend Sessions updates (#1754)
* convert sessions table logic to TS

* convert rest of sessions to TS

* sessions table logic refactor, store date in the url

* add back/forward buttons

* load sessions based on the URL, not after mount --> avoids duplicate query if opening an url with a filter

* prevent multiple queries

* throw error if failed instead of returning an empty list

* date from filters

* rename offset to nextOffset

* initial limit/offset block

* indent sql

* support limit + offset

* load LIMIT+1 sessions in postgres, pop last and show load more sign. (was: show sign if exactly LIMIT fetched)

* based offset is always 0

* default limit to 50

* events in clickhouse sessions

* add elements to query results

* add person properties to sessions query response

* show seconds with two digits

* fix pagination, timestamp calculation and ordering on pages 2 and beyond

* mypy

* fix test

* add default time to fix test, fix some any(*) filter issues

* remove reverse

* fix mypy error, indent SQL

* add pagination test for postgres

* Run insight API tests in Clickhouse

Co-authored-by: Eric <eeoneric@gmail.com>
2020-10-01 05:27:35 -04:00
Shashwat
d4459ab448
Changes to make person editable (resolves #89) (#1491)
* added editable table for person data

* update to setPerson, changes to make person editable

* Ran Prettier

* ran Eslint

* update user properties

* ran prettier

* don't allow person edit before change

* wakey wakey GitHub Actions

* fix to send person state to api.update

* Added antd's confirm modal to save/delete data , removed browser alert

* Delete Person Modal not in scope of current PR reverting delete moadal changes

* ran prettier

* Update Person.js

Remove unused import

* minor style change

* Fixed showing name which caused user with only is_demo true not show, save button now vsisble on all dimensions, is_demo is now editable

* minor style fixes

* Made Person's Number non-editable

* Disable input for PostHog internal varaiables

* added change to typecast to desired value

* added function description

* Handle diffrenet properties type.

* ran prettier

Co-authored-by: Yakko Majuri <yakko.majuri@gmail.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
2020-09-30 17:22:55 +02:00
Eric Duong
83bf6056b6
change all to sync execute (#1776) 2020-09-30 11:18:35 -04:00
Eric Duong
b9e2aca322
[clickhouse] Fix rel time months (#1774)
* fix rel time months

* .
2020-09-30 10:49:04 -04:00
Paolo D'Amico
457ae83b80
Report all non-DRF exceptions to sentry (#1773)
* report all non-DRF exceptions to sentry

* update drf-exceptions-hog
2020-09-30 10:32:38 -04:00
James Greenhill
fad85a5f4e
Convert sync execute to use clickhouse connection pool (#1762)" (#1770) (#1771)
* Revert "Revert "Convert sync execute to use clickhouse connection pool (#1762)" (#1770)"

This reverts commit cbb8fb01a9.

* remove runtime requirement from posthog, that is convered in posthog-production

* Bump the max number of connections in the pool
2020-09-30 15:07:10 +01:00
James Greenhill
08f6879343
Bump posthoganalytics requirement for feature flag bugfixes (#1772) 2020-09-30 15:05:13 +01:00
James Greenhill
cbb8fb01a9
Revert "Convert sync execute to use clickhouse connection pool (#1762)" (#1770)
This reverts commit fedd2428aa.
2020-09-30 14:19:03 +01:00
James Greenhill
2db31e2cd7
Set heroku python runtime to python 3.8.6 (#1769)
* Set heroku python runtime to python 3.8.6

* Have tests run against python 3.8
2020-09-30 13:59:46 +01:00
Tim Glaser
ea7c156cc8
1684 allow ip override (#1744)
* Test commit

* Closes #1684 allow ip override in properties
2020-09-30 13:54:26 +02:00
Tim Glaser
8676de2a6e
Fix sessions team filtering (#1766)
* Fix sessions team filtering

* Improve str.format readability

Co-authored-by: Michael Matloka <dev@twixes.com>
2020-09-30 13:42:31 +02:00
Yakko Majuri
3959b12610
change title of live actions table (#1756) 2020-09-30 12:04:39 +02:00
James Greenhill
fedd2428aa
Convert sync execute to use clickhouse connection pool (#1762)
* Convert sync execute to use clickhouse connection pool

* type fixes

* use pool for tests to feel safe
2020-09-29 19:26:58 +01:00
James Greenhill
389571df42
Test if any filters exist and if they do make sure there are properties to filter on for decide endpoint (#1759)
* Test if any filters exist and if they do make sure there are properties to filter on for decide endpoint

* nit fix
2020-09-29 12:06:52 -04:00
Marius Andra
37ccb7026f
Fix demo urls (#1757) 2020-09-29 12:06:21 -04:00
Eric Duong
e3e3501f2b
fix response (#1760) 2020-09-29 16:31:29 +01:00
James Greenhill
379518e285
"Clickhouse Features V2 (#1565)" (#1750)
* initial

* migration command

* migrations working

* add modelless views for clickhouse

* initial testing structure

* use test factory

* scaffold for all tests

* add insight and person api

* add basic readme

* add client

* change how migrations are run

* add base tables

* ingesting events

* restore delay

* remove print

* updated testing flow

* changed sessions tests

* update tests

* reorganized sql

* parametrize strings

* element list query

* change to seralizer

* add values endpoint

* retrieve with filter

* pruned code to prepare for staged merge

* working ingestion again

* tests for ee

* undo unneeded tests right now

* fix linting

* more typing errors

* fix tests

* add clickhouse image to workflow

* move to right job

* remove django_clickhouse

* return database url

* run super

* remove keepdb

* reordered calls

* fix type

* fractional seconds

* fix type error

* add checks

* remove retention sql

* fix tests

* add property storage and tests

* merge master

* fix tests

* fix tests

* .

* remove keepdb

* format python files

* update CI env vars

* Override defaults and insecure tests

* Update how ClickHouse database gets evaluated

* remove bootstrapping clickhouse database routine

* Don't initialize the clickhouse connection unless we say it's primary

* .

* fixed id generation

* remove dump

* black settings

* empty client

* add param

* move docker-compose for ch to ee dir

* Add _public_ key to repo for verifying self signed cert on server

* update ee compose file for ee dir

* fix a few issues with tls in migrations

* update migrations to be flexible about storage profile and engine

* black settings

* add elements prop tables

* add elements prop tables

* working filter

* refactored

* better url handling

* add mapping table

* add processing to worker task

* working cohort with actions

* add cohort property filtering

* add cohort property filtering

* reformat and add cohort processing

* prop clauses

* add util

* add more util

* add clickhouse modifier

* Clickhouse Sessions (#1623)

* sessions sql

* skeleton

* add endpoint

* better tests

* sessions list

* merge clickhouse-actions

* added session endpoint

* sessions sql working again

* add clickhouse modifier

* session avg with props working

* add dist

* tests working (no list)

* list working

* add formatting

* more formatting

* fix tests

* dummy commit

* fix types

* remove unnecessary improt

* ignore type when importing from ee in task

* fix test running

* Clickhouse Trends Base (#1609)

* initial working

* date param almost working

* fix date range and labels

* fixed monthly math

* handle compare

* change table

* using new event ingestion

* direct query actions working

* remove interface

* fix date range

* properties initial working

* handle operator

* handle operator

* move timestamp parse

* move more to util

* inital breaking down working

* working cohort breakdown

* some tests running

* fix sessions

* cohort tests

* action and interval test

* reorder cohort filtering

* rename retention test

* fix inits

* change multitenancy tests

* fix types

* fix optional types

* replace ch_client.execute with sync_execute

* replace ch_client.execute with sync_execute, part 2

* Clickhouse Stickiness + Process Event (#1654)

* generate clickhouse uuid script

* set CLICKHOUSE_SECURE=False by default if running in TEST or DEBUG

* convert person_id to UUID, make adding `person_id` optional, add distinct_ids already in the `create_person` function

* Fix test_process_event_ee.py, remove all calls to Person.objects.*

* add back util

* fix broken imports

* improve process_event test clickhouse queries

* Basic stickiness query

* Clickhouse Stickiness tests

* stickiness test [WIP, actions fail]

* generate clickhouse uuid script

* change default test runner if PRIMARY_DB=clickhouse

* fix stickiness test for actions

* fix merge bug

* remove _create_person stub; cohort person_id is UUID now

* fix typing

* Clickhouse trends process math (#1660)

* most of process math works

* all process math

* fix ordering issue

* unusued imports

* update property comparison for process_event_ee

* indentation wrong missing calls

* demo users and events (#1661)

* finish breakdown filtering tests and reformat label function

* add increment to demo_data

* update demo data populating

* Add people endpoint for ch (#1670)

* add people endpoint for ch

* stickiness people

* fix value padding

* add process math to breakdown and

* add limit

* fix tests

* condensed code

* converted test to factory

* add people tests

* add month handling

* add typing fix

* change people test handling

* fix tests

* Clickhouse funnels 2 (#1668)

* add elements to create_event

* WIP closes #1663 Add funnels to clickhouse

* Make funnels work

* Clean up

* Move filtering around

* Add mypy tests and fix

* Performance improvements

* fix person tests again

* add people for funnel endpoint

* fix prop numbering

Co-authored-by: Marius Andra <marius.andra@gmail.com>
Co-authored-by: Eric <eeoneric@gmail.com>

* merge master

* add retention

* update types

* more typing errors

* fix types

* bug with kafka payload, elements insert, and demo data

* Clickhouse Paths (#1657)

* paths clickhouse test (fails)

* add elements to create_event

* make this fail for clickhouse

* hardcoded query that returns good results for $pageviews, no filters yet

* clean up queries

* bound by time, fix 30min new session boundary

* support screen and custom events

* add properties filter

* paths url

* filter by path start

* better path start test

* even better path start test

* start from the first "path start" in a group

* test for person_id in paths

* partition by person_id for POSTGRES paths

* partition by person_id for Clickhouse paths

* clean up order in paths test

* clean up order in paths test

* join elements

* force element order on element group creation

* remove "order" when creating elements in tests and demo

* get list of elements for paths

* add limit to paths query

* use materialized view

* rename "element_hash" to "elements_hash" (no change in db)

* cull rows that are definitely unused

* simplify query

* New highly optimized paths clickhouse query

* start_point for $autocapture paths

* extract event property values from clickhouse

* prevent crash

* select one element sql

* get elements for event

* remove lodash

* remove host from $pageview path elements if same domain as incoming path

* show metadata based on loaded paths filter, not in flight filter

* fix order (all soures and targets in order, not all sources first, then all targets after) - makes for a better looking graph

* add test that makes the Postgres paths query fail

* fix postgres paths --> no fuzzy matching, breaks "starts with" for urls and gives too many incorrect start points

* create automatic /demo urls that match the real urls (no ending /)

* fix elements queries

* path element joins

* create persons via postgres in paths test

* change serializers back to id

* fix tests with uuid

* fix demo

* more bugs

* fix type

* change now to timezone aware

* [clickhouse] retention filters (#1725)

* implemented target entity and prop filtering

* add insight view override

* fix endpoint and filters

* include tests

* fix tests

* add period filtering

* .

* fix pg param name

* add filtering params to both queries in retention sql

* fix param again

* change to todatetime

* change tz to timezone

* add back timezone in model/event

* [clickhouse] feature flag endpoint requests (#1731)

* add feature flags to endpoints

* add flags to endpoints that check on request

* remove magic strings and fill in missing flags

* fix types

* add missing flag

* change from iso

* fix more timestamps and comparator

* change _people to get_people in actions view

* remove action and cohort populating

* change inheritance

* "Clickhouse Features V2 (#1565)"

This reverts commit 0b371d43ec.

* fix types

* change to super

* change to super x2

Co-authored-by: Eric <eeoneric@gmail.com>
Co-authored-by: Marius Andra <marius.andra@gmail.com>
Co-authored-by: Tim Glaser <tim.glaser@hiberly.com>
2020-09-29 15:17:26 +01:00
Tim Glaser
6cbe76f401
Bump posthog analytics version (#1751) 2020-09-29 15:51:55 +02:00
Michael Matloka
13e32aaff9
Replace uuid4 and uuid1_macless with UUIDT (#1726)
* Replace uuid1_macless with UUIDT

* Add machine_component

* Update comment

* Remove machine_component in favor of larger time_component

* Update UUIDT docstring
2020-09-29 15:39:18 +02:00
Marius Andra
bf326b3fde
fix toolbar fade container click block (#1753) 2020-09-29 12:37:26 +01:00
James Greenhill
0b371d43ec
Revert "Clickhouse Features (#1565)" (#1748)
This reverts commit 24713b923d.
2020-09-29 12:11:28 +01:00
Paolo D'Amico
b3532c598a
Weekly report email V1 (#1700) 2020-09-29 11:56:29 +01:00
Tim Glaser
d54ee5234e
Add personal api key (#1747)
* Test commit

* Add personal key

* Consistency
2020-09-29 11:52:07 +01:00
Eric Duong
24713b923d
Clickhouse Features (#1565)
* initial

* migration command

* migrations working

* add modelless views for clickhouse

* initial testing structure

* use test factory

* scaffold for all tests

* add insight and person api

* add basic readme

* add client

* change how migrations are run

* add base tables

* ingesting events

* restore delay

* remove print

* updated testing flow

* changed sessions tests

* update tests

* reorganized sql

* parametrize strings

* element list query

* change to seralizer

* add values endpoint

* retrieve with filter

* pruned code to prepare for staged merge

* working ingestion again

* tests for ee

* undo unneeded tests right now

* fix linting

* more typing errors

* fix tests

* add clickhouse image to workflow

* move to right job

* remove django_clickhouse

* return database url

* run super

* remove keepdb

* reordered calls

* fix type

* fractional seconds

* fix type error

* add checks

* remove retention sql

* fix tests

* add property storage and tests

* merge master

* fix tests

* fix tests

* .

* remove keepdb

* format python files

* update CI env vars

* Override defaults and insecure tests

* Update how ClickHouse database gets evaluated

* remove bootstrapping clickhouse database routine

* Don't initialize the clickhouse connection unless we say it's primary

* .

* fixed id generation

* remove dump

* black settings

* empty client

* add param

* move docker-compose for ch to ee dir

* Add _public_ key to repo for verifying self signed cert on server

* update ee compose file for ee dir

* fix a few issues with tls in migrations

* update migrations to be flexible about storage profile and engine

* black settings

* add elements prop tables

* add elements prop tables

* working filter

* refactored

* better url handling

* add mapping table

* add processing to worker task

* working cohort with actions

* add cohort property filtering

* add cohort property filtering

* reformat and add cohort processing

* prop clauses

* add util

* add more util

* add clickhouse modifier

* Clickhouse Sessions (#1623)

* sessions sql

* skeleton

* add endpoint

* better tests

* sessions list

* merge clickhouse-actions

* added session endpoint

* sessions sql working again

* add clickhouse modifier

* session avg with props working

* add dist

* tests working (no list)

* list working

* add formatting

* more formatting

* fix tests

* dummy commit

* fix types

* remove unnecessary improt

* ignore type when importing from ee in task

* fix test running

* Clickhouse Trends Base (#1609)

* initial working

* date param almost working

* fix date range and labels

* fixed monthly math

* handle compare

* change table

* using new event ingestion

* direct query actions working

* remove interface

* fix date range

* properties initial working

* handle operator

* handle operator

* move timestamp parse

* move more to util

* inital breaking down working

* working cohort breakdown

* some tests running

* fix sessions

* cohort tests

* action and interval test

* reorder cohort filtering

* rename retention test

* fix inits

* change multitenancy tests

* fix types

* fix optional types

* replace ch_client.execute with sync_execute

* replace ch_client.execute with sync_execute, part 2

* Clickhouse Stickiness + Process Event (#1654)

* generate clickhouse uuid script

* set CLICKHOUSE_SECURE=False by default if running in TEST or DEBUG

* convert person_id to UUID, make adding `person_id` optional, add distinct_ids already in the `create_person` function

* Fix test_process_event_ee.py, remove all calls to Person.objects.*

* add back util

* fix broken imports

* improve process_event test clickhouse queries

* Basic stickiness query

* Clickhouse Stickiness tests

* stickiness test [WIP, actions fail]

* generate clickhouse uuid script

* change default test runner if PRIMARY_DB=clickhouse

* fix stickiness test for actions

* fix merge bug

* remove _create_person stub; cohort person_id is UUID now

* fix typing

* Clickhouse trends process math (#1660)

* most of process math works

* all process math

* fix ordering issue

* unusued imports

* update property comparison for process_event_ee

* indentation wrong missing calls

* demo users and events (#1661)

* finish breakdown filtering tests and reformat label function

* add increment to demo_data

* update demo data populating

* Add people endpoint for ch (#1670)

* add people endpoint for ch

* stickiness people

* fix value padding

* add process math to breakdown and

* add limit

* fix tests

* condensed code

* converted test to factory

* add people tests

* add month handling

* add typing fix

* change people test handling

* fix tests

* Clickhouse funnels 2 (#1668)

* add elements to create_event

* WIP closes #1663 Add funnels to clickhouse

* Make funnels work

* Clean up

* Move filtering around

* Add mypy tests and fix

* Performance improvements

* fix person tests again

* add people for funnel endpoint

* fix prop numbering

Co-authored-by: Marius Andra <marius.andra@gmail.com>
Co-authored-by: Eric <eeoneric@gmail.com>

* merge master

* add retention

* update types

* more typing errors

* fix types

* bug with kafka payload, elements insert, and demo data

* Clickhouse Paths (#1657)

* paths clickhouse test (fails)

* add elements to create_event

* make this fail for clickhouse

* hardcoded query that returns good results for $pageviews, no filters yet

* clean up queries

* bound by time, fix 30min new session boundary

* support screen and custom events

* add properties filter

* paths url

* filter by path start

* better path start test

* even better path start test

* start from the first "path start" in a group

* test for person_id in paths

* partition by person_id for POSTGRES paths

* partition by person_id for Clickhouse paths

* clean up order in paths test

* clean up order in paths test

* join elements

* force element order on element group creation

* remove "order" when creating elements in tests and demo

* get list of elements for paths

* add limit to paths query

* use materialized view

* rename "element_hash" to "elements_hash" (no change in db)

* cull rows that are definitely unused

* simplify query

* New highly optimized paths clickhouse query

* start_point for $autocapture paths

* extract event property values from clickhouse

* prevent crash

* select one element sql

* get elements for event

* remove lodash

* remove host from $pageview path elements if same domain as incoming path

* show metadata based on loaded paths filter, not in flight filter

* fix order (all soures and targets in order, not all sources first, then all targets after) - makes for a better looking graph

* add test that makes the Postgres paths query fail

* fix postgres paths --> no fuzzy matching, breaks "starts with" for urls and gives too many incorrect start points

* create automatic /demo urls that match the real urls (no ending /)

* fix elements queries

* path element joins

* create persons via postgres in paths test

* change serializers back to id

* fix tests with uuid

* fix demo

* more bugs

* fix type

* change now to timezone aware

* [clickhouse] retention filters (#1725)

* implemented target entity and prop filtering

* add insight view override

* fix endpoint and filters

* include tests

* fix tests

* add period filtering

* .

* fix pg param name

* add filtering params to both queries in retention sql

* fix param again

* change to todatetime

* change tz to timezone

* add back timezone in model/event

* [clickhouse] feature flag endpoint requests (#1731)

* add feature flags to endpoints

* add flags to endpoints that check on request

* remove magic strings and fill in missing flags

* fix types

* add missing flag

* change from iso

* fix more timestamps and comparator

* change _people to get_people in actions view

* remove action and cohort populating

Co-authored-by: James Greenhill <jams@uber.com>
Co-authored-by: Marius Andra <marius.andra@gmail.com>
Co-authored-by: Tim Glaser <tim.glaser@hiberly.com>
2020-09-29 06:36:50 -04:00
Marius Andra
1254e8ccbd
Remove Toolbar Dock Mode (#1733)
* remove dock code

* set "help" icon

* remove some extra styles, make button fade

* fade component to TS

* clear up a type

* fix fade-induced absolute bug

* make the help button round and blue

* Make rounding more similar and bring back gray

Co-authored-by: Michael Matloka <dev@twixes.com>
2020-09-29 10:29:31 +02:00
Paolo D'Amico
6320d05b08
Use drf-exceptions-hog package (#1732) 2020-09-29 09:07:51 +01:00
Michael Matloka
f81c6c3134
Improve Django commands for development (#1720)
* Rename setup_review to setup_dev

* Add a command for retrieving API keys through CLI
2020-09-28 21:25:50 +02:00
Michael Matloka
9d7dae201a
Make production docker-compose.yml generated (#1704)
* Make production docker-compose.yml generated

* Move "version" to top

* Update instructions

* Leave a fallback docker-compose.yml

* Fix grammar

* Update instructions

* Delete docker-compose.proxy.yml

* Improve error handling

* Update script

* Update wording
2020-09-28 20:50:38 +02:00
Michael Matloka
5477d256d2
Disable weekly status report on PostHog Cloud (#1730)
* Disable weekly status report on PostHog Cloud

* Fix MULTI_TENANCY detection
2020-09-28 13:21:03 +02:00
James Greenhill
d4b6f38e08
Use Django now for tz aware timestamps (#1728)
* Use Django now for tz aware timestamps

* include datetime for type checking
2020-09-28 06:30:21 -04:00
James Greenhill
82031580b3
Use utcnow(). Always default to UTC (#1727) 2020-09-28 10:26:39 +01:00
Eric Duong
549b77251d
fix field type (#1722) 2020-09-25 12:33:18 -04:00
James Greenhill
2bb97b8efa
Do not shadow Kafka default columns _timestamp and _offset (#1718)
* Do not shadow Kafka default columns _timestamp and _offset

* drop the columns only on the kafka_ tables

* include data types

* fields cleanups

* datetime -> datetime64

* double import datetime
2020-09-25 16:23:48 +01:00
Michael Matloka
c2ec67c948
Only allow using aggregate functions on numerical properties (#1536)
* Only allow aggregate functions on numerical properties

* Don't pass onclick when math option disabled

* Add numerical property to demo

* Fix demo

* Update test_demo.py

* Fix Team.event_properties_numerical updating

* Account for extra Team query

* Fix math selection options

* Change "cost" to "price"
2020-09-25 14:05:11 +02:00
James Greenhill
1ed6263a71
Create Omni-Person model for managing people in Clickhouse (#1712)
* Create Omni-Person model for managing people in Clickhouse

* type fixes

* rebase all the things

* cleanups

* id -> uuid for events in clickhouse

* cleanups and type checks

* Further cleanups and uuid conversions

* kafka fix

* break out serializer across kafka clients

* fix a few bugs w/ datetime types

* basic fix for people kafka table

* fix migration errors (copy pasta errors)

* Use KafkaProducer for Omni Person emitting

* setup mock kafka producer

* undo some work for inserting

* Test TestKafkaProducer

* change if order, obvious mistake

* remove unnecessary function arg

* Fix getters for new column

* Test fixes

* mirror columns across element queries

* firm up handling of timestamps

* only return timestamps for handle_timestamp

* Correct heroku config for Kafka
2020-09-25 11:05:50 +01:00
Yakko Majuri
8115e4969c
Added password strength bar (#1632)
* added password strength bar

* minor style fixes

* retry cypress

* extract password strength logic to standalone component

* Refactor with TypeScript

* updated strength algo

* fix linter comments

* fix comment

* made distinct chars test less strict

* use zxcvbn

* Make score numbers nicer and add a color between red and orange

Slightly pedantically made passwordScore always a multiple of 20%. :)

* run prettier

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
Co-authored-by: Marius Andra <marius.andra@gmail.com>
2020-09-25 02:37:55 +02:00
Marius Andra
e9ce195b99
Small insights type update (#1717)
* type update

* Update ci-backend.yml

* Update Django tests names

* Fix required check

Co-authored-by: Michael Matloka <dev@twixes.com>
2020-09-25 02:20:33 +02:00
Michael Matloka
6d633f8f31
Don't assume that each user belongs to a team (#1715)
* Don't assume that each user belongs to a team

* Kind of assume team and user for ease

* Fix types
2020-09-24 16:57:00 +02:00
Michael Matloka
604b98c17e
Fix migration issue (#1711)
* Update 0085_org_models.py

* Black migrations

* Update 0085_org_models.py
2020-09-24 16:19:35 +02:00
Michael Matloka
663cdc4f1c
Update 0085_org_models.py (#1710)
* Update 0085_org_models.py

* Black migrations
2020-09-24 15:14:53 +02:00