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

2220 Commits

Author SHA1 Message Date
Karl-Aksel Puulmann
da92f0bbac
Allow rolling feature flags out to multiple groups (#3030)
* Support multiple groups in feature flags model

This will be part of #3007

I did not do a migration since it would cause errors for decide endpoint
once migrations have run but new schema not up.

* Update analytics_metadata method

* Allow defining multiple groups in frontend

* Allow sorting

* Update tests, allow submit without filters.

* Update cypress

* Avoid N+1 queries

* Indicate filters better in table
2021-01-26 01:18:05 +02:00
Marius Andra
bfe6f859ec
Plugin upgrades (#3057)
* upgrade typegen

* check for upgrades in the interface

* refactor plugin scene files

* separate plugins needing updates

* show an update button

* show progress when checking

* actually update plugins + ux improvements

* open drawer if new required and unfilled field

* better loading for plugins

* fix frontend type error

* fix backend test

* Do tiny cleanup of version labels

* clarify role of custom.d.ts

* cache plugin update status for 30min, refresh update status on page load if stale

* fix tests

* Fix capitalization in updates check button

* fix bad merge

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-01-26 00:13:47 +01:00
Yakko Majuri
35c987f3df
Add autofill for posthog props in plugin config (#2838)
* Add autofill for posthog props in plugin config

* fix types

* restructure logic

* code quality

* fix code quality

* refactor api key generation

* more cleanup

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2021-01-25 23:36:14 +01:00
Paolo D'Amico
bc3a59ab10
Various fixes 210122 (#3058) 2021-01-25 11:38:21 +01:00
Paolo D'Amico
09283afcbe
Refactor web ingestion onboarding & add bookmarklet (#2953) 2021-01-25 10:49:59 +01:00
Eric Duong
eb279d142f
Show progress in retention table (#2995)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-25 10:24:00 +01:00
Marius Andra
3259f8e706
Some typescript fixes (#3049)
* fix sceneLogic and teamLogic

* personLogic one fix

* navigationLogic type

* topContentLogic type

* personalAPIKeysLogic type

* BackTo type

* few other quick wins

* Update blacklist after rebase

Co-authored-by: Karl-Aksel Puulmann <oxymaccy@gmail.com>
2021-01-25 11:05:36 +02:00
Steven Phaedonos
4f166eb9aa
Closes #3065 resolve sessions by distinct ID error (#3066)
* Closes #3065 resolve sessions by distinct ID error

* Add test

Co-authored-by: Karl-Aksel Puulmann <oxymaccy@gmail.com>
2021-01-25 10:42:37 +02:00
Marius Andra
88e1300a14
fix exception when using a bad selector to select actions (#3067) 2021-01-25 09:35:07 +01:00
Yakko Majuri
cda7255b96
Remove bulk events gen (#3061) 2021-01-25 10:21:54 +02:00
Karl-Aksel Puulmann
365243a102
Fix session recording breakage (#3045)
* Fix broken session recording case

No strict typescript makes me sad. This property was gone during
refactoring, probably broken due to parallel PRs.

* Make pagination respect filters
2021-01-25 08:49:55 +02:00
Karl-Aksel Puulmann
a978b28a68
Run typescript with strict in CI, allow no new errors (#3050)
* Verify no new typescript code breaks "strict" compilation

With this we have a file containing all current errors. As the code
changes, we should not add more errors here.

* remove some lines to show a failure

* Add total count to script

* Update blacklist after rebase

* Remove some fails on purpose.

* Attempt a reorder

* Add missing file

* Update script to write typegen

* Refresh list

* Attempt to use normal tsc

* update blacklist

* Store all errors

* echo for typegen

* Add check command

* typegen 3 times

* typegen 4 times

* typegen 6 times

* typegen 10 times

* remove debug code

* Update kea typegen to latest

* Remove hacks
2021-01-22 16:36:30 +02:00
Michael Matloka
257d596038
Use KAFKA_HOSTS instead of KAFKA_URL in ECS dockerized plugin server (#3054) 2021-01-22 15:18:16 +01:00
Michael Matloka
efe8870c85
Fix plugin server task definition rendering (#3053) 2021-01-22 15:01:25 +01:00
Michael Matloka
56de9e9226
Run independently Dockerized (#3052) 2021-01-22 14:47:06 +01:00
Marius Andra
19b453c996
Kea TypeGen types in the same folder as logic (#3048)
* update kearc to generate types in the same folder, add types to gitignore

* update type imports
2021-01-22 10:21:48 +01:00
Marius Andra
0c6682f859
Plugin Server 0.6.8 (#3043)
* living on the edge

* Upgrade to plugin server 0.6.8

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-01-21 23:43:49 +01:00
Eric Duong
cba416b9de
add try statement for deleting persons incase the table is dsitrbuted (#3042) 2021-01-21 15:30:09 -05:00
Yakko Majuri
7c0cc81105
Hide plugins from nav in Cloud (#3038)
* Add plugins on new nav behind feature flag (cloud)

* filter by plugin org access

* remove accidental commit
2021-01-21 16:23:02 -03:00
Eric Duong
97f0cbd27a
Round sessions value (#2925)
* add scaling function

* adjust test

* update tests

* patch errors

* fix import
2021-01-21 13:24:59 -05:00
Eric Duong
a2f84735bf
Only aggregate breakdown if it's a table or pie chart (#3023)
* add condition when aggregating breakdown

* update test

* add comment
2021-01-21 17:38:27 +01:00
Eric Duong
7001a1ce02
patch null check (#3037) 2021-01-21 11:22:52 -05:00
Marius Andra
b385100a64
plugin server 0.6.6 (#3035) 2021-01-21 16:51:54 +01:00
Michael Matloka
eaa169100a
Add handing off event ingestion to plugin server (#2898)
* Add setting for handing off process_event_ee to plugin server

* Add StatsD settings to KEYS

* bin/plugin-server → start-plugin-server & docker-plugin-server

* Simplify to only add docker-plugin-server

* Bring back original comment

* Turn down verbosity of plugin server install

* Remove redundant if

* Fix comment

* Remove lone newline

* Roll back unsafe script changes

* Simplify dockerized plugins

* Add some depends_on

* Clarify HAND_OFF_INGESTION env var

* Use posthog-plugin-server 1.0.0-alpha.1

* Enhance bin/plugin-server and rm bin/docker-plugin-server

* Move around PLUGIN_SERVER_INGESTION_HANDOFF ifs

* Use posthog-plugin-server@1.0.0-alpha.2

* Support kafka+ssl:// in plugin-server

* Produce to topic events_ingestion_handoff for plugin server

* Use posthog-plugin-server@1.0.0-alpha.3

* Don't import Kafka topics in FOSS

* Use @posthog/plugin-server

* Update yarn.lock

* Add commands for external ClickHouse setup/teardown

* Actually delete test CH teardown command

* ClickhouseTestRunner.setup_test_environment() in setup_test_clickhouse

* Rework test setup script to work with Postgres too

* Restore master plugins dir for merge

* Unset PLUGIN_SERVER_INGESTION_HANDOFF in docker-compose.ch.yml

* Fix unimportant typo

* Build log_event data dict only once

* Make it clear in bin/plugin-server help that it's bin

* Space space
2021-01-21 15:39:44 +01:00
Marius Andra
fed2ea33cb
Plugin unique url with different private tokens & improve privacy (#3033)
* don't return the plugin url's private token in the API response

* get 'url' from initial data since serializer makes it read_only

* add test for public token uniqueness

* fix return type

* fix test
2021-01-21 14:39:37 +01:00
Michael Matloka
78ecbb60e7
Delete omni_person.proto (#3014)
We don't use this `omni` stuff.
2021-01-21 14:13:04 +01:00
Michael Matloka
481e9ddc6f
Don't install unused pandas and numpy (#3034)
* Don't install unused pandas and numpy

* Use built-in NaN instead of Numpy's
2021-01-21 13:47:18 +01:00
Pankaj Chauhan
c021efc4af
2248 remove pandas numpy (#2997)
* removed pandas dependency from trends.py

* added generic function for daterange and removed pandas dependency from session.py

* removed pandas datetime offset code

* solved issue with daterange in utils

* solved issue with week interval

* solved issue with testcases and trends.py

* added comments in utils and trends

* solved typecheck error in trends.py

* solved issue in session.py
2021-01-21 12:59:58 +01:00
Tim Glaser
aa592a3b74
Exclude health from ip block (#3027) 2021-01-21 12:26:14 +01:00
Karl-Aksel Puulmann
29c1ed954d
Allow filtering by unseen recordings (#3000)
* Add model for session recording viewed

* Save view when querying for session recording data

* Send information to FE about whether session has been viewed

* Allow filtering by "recording unseen"

* Rename property

* Update migration
2021-01-21 09:42:00 +02:00
James Greenhill
a0a637bb49
Don't include materialized columns in kafka table (#3026) 2021-01-20 20:39:20 -08:00
Tim Glaser
811e414ce3
Standardize created at and by table columns (#2961)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-20 20:08:31 -06:00
James Greenhill
62b5343a62
Add user param for clickhouse if provided (#3025)
* Add user param for clickhouse if provided

* remove duplicate setting - forgot it was there!

* inconsistent naming between migrations and clickhouse-driver
2021-01-20 16:54:03 -08:00
James Greenhill
85a4c1c9d6
Setup logging to system.text_log in dev environment (#3024) 2021-01-20 16:51:11 -08:00
Martin Chodur
d7f1337e43
feat: set event root logger severity using the DJANGO_LOG_LEVEL env variable (#3016)
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
2021-01-20 13:25:50 -05:00
Martin Chodur
01fc4ef29e
feat: allow setting Sentry environment by using the SENTRY_ENVIRONMENT env variable (#3015)
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
2021-01-20 18:12:48 +01:00
Tim Glaser
62c5e18358
Fix multiple actions in funnel (#3011) 2021-01-20 15:53:34 +01:00
Eric Duong
6e7ff0d4db
Revert "Add timeout and error messages (#2876)" (#3012)
This reverts commit c2f844c832.
2021-01-20 09:51:35 -05:00
Marius Andra
10b5f20f80
Plugins page UX improvement (#3006)
* open drawer if plugin installed but never configured when toggling switch

* ?.

* set initial/unsaved changes when opening plugin drawer

* set "enabled" to true when installing plugin

* use plugin url as key to remove installed plugins from repository, not name

* extra fix

* disallow multiple plugin installations from the same URL
2021-01-20 14:16:29 +01:00
Tim Glaser
f1f8a0b7f5
Add denormalized prop config (#3009) 2021-01-20 13:53:45 +01:00
Tim Glaser
c2f844c832
Add timeout and error messages (#2876)
* Only grab recent events in Events list

* Add timeout and error messages

* Add timeout messages to other items

* Add instrumentation, fixed issues

* Longer timeout for plugins

* update UI for error message

* UI for timeout message

* Fix funnel timer, improve error message

* change icons when timeout has elapsed

* Fix error messages

* Fix funnel loading timeout

* fix errors

* fix exception

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-20 12:45:08 +01:00
Tim Glaser
02044c616f
Denormalize clickhouse props (#2903)
* Denormalize clickhouse props

* Add allow_denormalized_props option

* Use funnels

* fix funnel query

* Add more denormalized props

* Fix comma

* Use materialized columns instead of mat views

* duplicate ,'s

Co-authored-by: James Greenhill <fuziontech@gmail.com>
2021-01-20 12:38:27 +01:00
Karl-Aksel Puulmann
9354b7ce64
Highlight filtered events in events table and in session recording (#2954)
* Highlight rows from sessions which are matched by the filter

* Send start_time of recording to frontend

This helps us calculate offsets a bit better

* Use timestamp by server for date shown

* Load session events via kea logic

* Update rrweb, rrweb-player

* Highlight events user is filtering for in sessions player

* Handle empty case properly

* Add positive test

* Order session recording events in query

* Fix filtering by multiple events with differing names

previously only the first would have been used due to overlapping
params.

* Return all highlighted times as action_filter_times

* Send back ids not timestamps

This avoids weird rounding errors causing issues

* Show skeleton for longer

* update typing

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-19 21:16:42 -06:00
Karl-Aksel Puulmann
c245af6a3e
Filters design followups (#2993)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-19 20:58:21 -06:00
Eric Duong
0a68184cc4
Use utc moment for retention dates and fix modal title (#2998) 2021-01-19 20:54:15 -06:00
Eric Duong
f269c2a43d
fix the itnerval bug (#2992) 2021-01-19 19:56:16 -06:00
Marius Andra
2dc132e388
Plugins Design Refresh (#2939)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-01-19 18:16:18 -06:00
Marius Andra
c6d3ea5fb0
upgrade to plugin server 0.6.5 (#3003) 2021-01-19 21:53:23 +01:00
Marius Andra
fe09e5d42b
Support for installing plugins from private GitLab repositories (#2991)
* gitlab private repositories

* fix test
2021-01-19 21:43:46 +01:00
Eric Duong
4b7b0d5abe
just match on localhost (#3002) 2021-01-19 21:37:30 +01:00