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

2509 Commits

Author SHA1 Message Date
Michael Matloka
941cfb386c
Revert "Use plugin-server container in containerized deploys" (#3516)
* Revert "Use plugin-server container in containerized deploys (#3515)"

This reverts commit 6fb295ed51.

* Update docker-compose.ch*.yml
2021-03-01 13:43:43 +01:00
Michael Matloka
6fb295ed51
Use plugin-server container in containerized deploys (#3515) 2021-03-01 12:56:33 +01:00
Tim Glaser
ca5c50b67a
Add UTM tags to property info (#3508) 2021-03-01 10:18:31 +01:00
Tim Glaser
516f22e029
Fix debug toolbar sql panel (#3507) 2021-03-01 10:17:55 +01:00
James Greenhill
cd7ccc779e
Run all connections through clickhouse connection pooler (#3495)
* Use clickhouse connection pooler to avoid connections from stepping on eachother

* build reqs
2021-02-26 12:54:35 -08:00
Michael Matloka
43c9105c17
Fix limit of events in CSV export (#3503)
* Fix limit of events in CSV export

* Limit to 100 instead of 101

* Optimize listing events

* Fix typing error

* Limit events to 100 better

* Fix len condition for using broader events queryset

* Add regression test

* Adjust ClickhouseEventsViewSet

* Fix CH events limit in CSV export

* Fix typing and missing +1

* Use limit in _query_events_list
2021-02-26 18:20:05 +01:00
Karl-Aksel Puulmann
fc512a97a0
Don't recalculate deleted cohorts (#3506)
Sentry error: https://sentry.io/organizations/posthog/issues/2200371518/?project=1899813&query=is%3Aunassigned+is%3Aunresolved
2021-02-26 17:13:44 +02:00
Karl-Aksel Puulmann
b7bdad90eb
Add test for bar charts (#3474)
* Add test for bar charts

Since our charts are rendered on a canvas we can't really interact well
with it. Instead, we take a screenshot now (new dependency).

* Debug error in CI

* Make sure images are the same size on CI and locally
2021-02-26 16:50:36 +02:00
Karl-Aksel Puulmann
152f799351
e2e-test-runner: Only start webpack if not already running (#3484) 2021-02-26 16:50:21 +02:00
Karl-Aksel Puulmann
a96d682ca1
Fix getting earliest timestamp on EE with no events (#3501)
Sentry error: https://sentry.io/organizations/posthog/issues/2236839278/?project=1899813&query=is%3Aunassigned+is%3Aunresolved
2021-02-26 15:31:22 +02:00
PostHog bot
e3baab33c9
Update plugin server to 0.11.1 (#3502)
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2021-02-26 13:50:09 +01:00
Karl-Aksel Puulmann
828c301299
Fix filtering sessions by action with property filters (#3500)
Fixes #3499
2021-02-26 11:24:31 +02:00
PostHog bot
51e6ccd485
Update plugin server to 0.10.3 (#3498)
* Update plugin server to 0.10.3

* Don't strip plugin server version of nonexistent quotes

Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
2021-02-26 02:22:56 +01:00
Karl-Aksel Puulmann
75f1332afc
Reload our feature flags after changing them (#3477)
This only "affects" our team and local development. I got tired of
needing to reload after toggling a feature flag locally. This makes it
so that the newly edited flag is applied immediately.
2021-02-25 16:28:52 -06:00
Tim Glaser
e5cfa68b60
Reduce calls to api/action (#3493)
* Reduce calls to api/action

* Fix saving
2021-02-25 22:48:53 +01:00
James Greenhill
eb6f19ea10
Create a connection every time a query is run (#3467)
* Connect each time sync_execute is called

* clean up unused substitute_params
2021-02-25 11:27:05 -08:00
Eric Duong
195a358819
Change graphs to ts (#3181)
* change to TS

* fix type

* fix types

* add type to kea logic

* fix errors
2021-02-25 12:44:37 -05:00
Eric Duong
2d4daa6558
Revert "Revert "935 trend legend"" (#3489)
* Revert "Revert "935 trend legend (#3434)" (#3487)"

This reverts commit 5784f90df6.

* patch bug

* format breakdown label

* add ff
2021-02-25 12:06:06 -05:00
Eric Duong
5784f90df6
Revert "935 trend legend (#3434)" (#3487)
This reverts commit cd660e52f8.
2021-02-25 11:41:57 -05:00
Eric Duong
cd660e52f8
935 trend legend (#3434)
* base table legend

* toggle visibility logic

* colors working

* display data in legend

* clean up types and conditions

* review-points

* missing constant from merge

* Make the table small

* disabled when only 1 is left and add label clickable

* add better label handling

* fix test

Co-authored-by: Tim Glaser <tim@glsr.nl>
2021-02-25 10:59:35 -05:00
Karl-Aksel Puulmann
eb7b361401
Fix: funnels & retention person links, funnel calculations (#3483)
* Fix links to people from Retention modal and Funnels.

More details under issue https://github.com/PostHog/posthog/issues/3480

* Fix funnel calculations on self-hosted

Broken by renames within https://github.com/PostHog/posthog/pull/3301

* Handle cached calculations in e2e test runner

When executing e2e tests, celery tasks are evaluated immediately. Previously
due to the caching the funnels never loaded as we overwrite the results immediately.

* Add test for navigating to persons from funnels

* Test for retention visualization and person navigation
2021-02-25 17:41:25 +02:00
Karl-Aksel Puulmann
264d4b03db
Bar chart by value (#3457)
* Extract const for a frequent if-statement

* Show bar graph

* Show bar chart breaking down by value

* Don't show interval filter when non-time based visualization

* Set axis color as expected

* Add percentage of total to bar graph

* Include action info in tooltip for value graph

* Support DashboardItem

* Mark prop as optional

* Convert new file to typescript

* Disable bar value for stickiness
2021-02-25 17:01:05 +02:00
Karl-Aksel Puulmann
f36495bec6
Filters: Select multiple for equality/inequality (#3422)
* Don't colorize sql for output

* Handle setting array props as values

* Handle arrays exact/is_not property filters

Also updates tests to use parameterization

* Avoid autoclosing PropertyFilter popup

As key changes, old one got removed from DOM

* Improve filter UX

Don't allow filter to become multi-line and keep inputs the same size.

Previous flex={1} was doing flex: 1 1 auto which was messing things up

* Fix typescript issue

* Handle array lookups in postgres

* Update types

* Fix fixture to recreate tables

* Make replace spaces logic consistent with what was there before

* Handle list filtering better in postgres

* Update frontend tests

* Handle edge case: Switching between multi operator and single operators
2021-02-25 16:54:55 +02:00
Karl-Aksel Puulmann
bd9a44cdb3
Fix "unseen sessions" filter (#3478) 2021-02-25 16:26:42 +02:00
PostHog bot
d660755a50
Update plugin server to 0.10.1 (#3481)
* Update plugin server to 0.10.1

* Remove PLUGIN_SERVER_INGESTION for plugins tasks/images

Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
Co-authored-by: Marius Andra <marius.andra@gmail.com>
2021-02-25 14:36:41 +01:00
Marius Andra
74ed8bb50b
Don't null IPs for teams who toggled an ancient field (#3462)
* don't null ips for teams who toggled an ancient field

* Update User.anonymize_data instead

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-02-25 14:11:41 +01:00
Michael Matloka
a50822b27f
Fix "passowrd" on invite page (#3473) 2021-02-25 12:26:52 +01:00
Marius Andra
84d853748d
Earlier IP anonymization (#3464)
* Clarify what anonymize_ips does

* Hide IP before event ingestion, not during (hides it also from the task queues and plugins)

* flip it around

* add IPs to tests that expected them to be there

* "Discard"

* test that everything works when ip is none
2021-02-25 10:31:33 +01:00
Michael Matloka
55ffbb04a1
Fix invite signup being inaccessible for users without org or project (#3466) 2021-02-25 10:14:10 +01:00
Marius Andra
325a8d653e
Alert if plugin server down (#3465)
* Alert if plugin server down

* Strip plugin server version of quotes

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-02-25 01:57:49 +01:00
Michael Matloka
4a08abf789
Bulk invite the Polish (#3346)
* Refactor bulk invites to use OrganizationInviteViewSet

* Refactor BulkInviteModal

* Flyby utils fix

* Make invitation button nicer

* Fix dropdown Invite button

* Fix invites/bulk response status

* Update test_organization_invites.py

* Fix Formula typing

* Fix test_invites_are_create_atomically

* Fix typing

* Update comment

* The to each

* Address feedback and introduce optimizations

* Fix tests

* Polish

* use single invite on user dropdown if email is not available

* Add unit tests for pluralize

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-02-24 23:41:08 +01:00
Paolo D'Amico
4e8ccbc2b6
Rename posthog-production to posthog-cloud (#3460) 2021-02-24 16:20:05 -06:00
Michael Matloka
b9f00b2710
Fix webhooks specifity (#3463)
* Fix webhooks specifity

* Make REST hook firing monitoring better reflect reality
2021-02-24 23:14:02 +01:00
PostHog bot
76b3a7d002
Update plugin server to 0.9.29 (#3459)
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2021-02-24 19:53:27 +01:00
Paolo D'Amico
64bbc9240d
Clean-up post-migration of invite signup (#3353) 2021-02-24 10:29:24 -06:00
Eric Duong
9514e290a2
Static cohort on person modal (#2952)
* Upload static cohort using CSV, closes #2868

* fix tests

* Fix tests

* Fix e2e test

* Avoid double inserts

* Speed up query

* Move to params

* fix tests

* initial cleanup

* initial scaffold for cohort static logic

* intiial frontend changes

* initial working

* fix error on iterable

* stickiness people func refactor

* Use JSON instead of protobuf

* stickiness working

* clickhouse route

* unused import

* move button

* make interface easier to user

* clickhouse support

* restore cache decorator

* endpoint adjustment

* adjust how clickhouse handles inserting for static cohorts

* split out processing into pg

* use worker for clickhouse querying too

* add pg test

* ee test

* add input for cohort naming

* add stickiness test

* condition for when to show save cohort

* fix types

* minor fix

* remove repeats

* remove hardcoded id

* add date handling to trends cohort func

* remove print

* add link on success creation

* cohort working

* fix backend test

* fix cohort typescript

* remove unnecessary kafka topic

* remove brackets

* shift default

* raise exceptions when debug or test is true

* remove test flag

* move trends insight related components to different folder

* change get_earliest_timestamp

* remove extraneous condition

* fix test call

* put behind ff

* fix test x2

* fix tests

* restore exceptions hog

* fix tests

* restore exceptions hog

* fix test x20

Co-authored-by: Tim Glaser <tim@glsr.nl>
2021-02-24 09:59:13 -05:00
PostHog bot
3aaba31c8d
Update plugin server to 0.9.28 (#3456)
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2021-02-24 12:49:49 +01:00
Yakko Majuri
56fb1f49f1
Set props to user on any event (#3444) 2021-02-24 12:22:54 +01:00
Tim Glaser
28dc79adf6
Improve django admin for organizations (#3405)
* Improve django admin for organizations

* link from user

* remove permissions fields which we don't use

* add org count to avoid confusion

* simplified org billing link as it's OneToOne ID is the same

* add nice arrow

* remove stale import

* fix typing

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-02-24 12:09:48 +01:00
Marius Andra
0e6f00db94
Send all events to plugin server (#3452) 2021-02-24 12:08:50 +01:00
Karl-Aksel Puulmann
28b44e9b7a
Fix setting up test databases on clickhouse (#3451)
This was used by plugin server
2021-02-24 11:58:01 +02:00
PostHog bot
3d3d0f92cf
Update plugin server to 0.9.26 (#3450)
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2021-02-24 10:03:33 +01:00
Marius Andra
3b83b54313
Send 90% of events to plugin server (#3449) 2021-02-24 09:18:33 +01:00
Karl-Aksel Puulmann
24de8b55e4
Run tests via pytest (#3417)
* Compile requirements-dev.txt with latest pip-tools

* Install pytest

* Avoid picking up factories as tests

* New runner

* Always set TEST env variable running tests

Some of our tests rely on it.

* Remove repetition

* Fix a broken test

* Cut down noise from bin/tests

* Rename test factory

* Fix stickiness filter

* Skip a broken test

This has been broken since numpy removal PR. Sadly tests were not
running for this submodule

* Fix import on ee

* Run ee tests properly

The django_db_setup fixture will be automatically run when running ee/
module tests.

* Make tests run on CI

* Include REDIS_URL, fix cloud

* Set TEST env variable

* Hack cloud tests to work

* Attempt at workflow fix

* Import Person model when running ee tests

This module implicitly adds hooks, so this is needed when running tests

* Respect reuse-db for clickhouse

* Add custom markers to avoid warnings

* pytest: use ch test database always

Accidentally wiped by ch setup a few times without this. Oops

* Remove repetition in tests

* Pytest: Always run migrations

Testing a state cleanup fix

* Use same DB in conftest and main code

* Pytest: autoset TEST setting without env variable

* fix broken test

Co-authored-by: eric <eeoneric@gmail.com>
2021-02-24 09:32:44 +02:00
PostHog bot
e4c8923a75
Update plugin server to 0.9.25 (#3447)
Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
2021-02-23 21:53:56 +01:00
Eric Duong
c22f59eb52
change frequency and interval (#3446) 2021-02-23 15:36:57 -05:00
PostHog bot
146469770b
Update plugin server to 0.9.24 (#3445)
* Update plugin server to 0.9.24

* Add more hook metrics in Python

Co-authored-by: posthog-bot <posthog-bot@users.noreply.github.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
2021-02-23 18:07:06 +01:00
Eric Duong
23a7c9e2df
Fix clicking datapoint with multiple entities (#3428)
* remove unnecessary condition

* change all refs

* fix switched params

* remove targeet entity from filter
2021-02-23 11:03:14 -05:00
Michael Matloka
36bc39b09b
Add telemetry for the hooks task (#3442) 2021-02-23 16:56:21 +01:00
Marius Andra
1601740bda
add : in front of password for ioredis (#3439) 2021-02-23 13:04:33 +01:00