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

6585 Commits

Author SHA1 Message Date
Karl-Aksel Puulmann
c2bddf09a2
Remove "minute" interval (#7847)
* Remove `minute` interval support from frontend

* Remove minute support from backend, default to hour instead

Also adds tests for interval logic

* Remove now-dead minute support from backend

* revert interval_candidate logic

* Move IntervalMixin to separate file
2022-01-05 13:11:58 +02:00
Karl-Aksel Puulmann
e5ee7b4270
Read from and write to person_distinct_id2 if async migration is done (#7846)
* Run queries against person_distinct_id2 when async migration is done

* Only write to clickhouse_person_unique_id topic if async migration is incomplete

* Update query snapshots

* Update plugin-server

* Adjust caching logic
2022-01-05 13:11:33 +02:00
Karl-Aksel Puulmann
2139a6e204
Add measure.sh helper script to repo (#7877) 2022-01-05 12:46:08 +02:00
Michael Matloka
cfec3f2d20
Don't exit insight edit mode on Esc click (#7864) 2022-01-05 11:16:26 +01:00
Paolo D'Amico
e674cd2a6d
Use localStorage + cookie persistence (#7890) 2022-01-05 09:23:18 +00:00
Michael Matloka
ac72438e22
Avoid Events table reloading on autoload toggle (#7868)
* Avoid `fetchEvents` after `toggleAutomaticLoad`

* Add tests
2022-01-05 06:11:22 +00:00
Alex Gyujin Kim
b916ffad37
Remove absolute dates from options (#7757) 2022-01-04 18:04:23 -06:00
Alex Gyujin Kim
6fb7662cfa
Fix incompleteness custom date ranges bug (#7870) 2022-01-04 09:30:35 -08:00
Neil Kakkar
8d7614bc7c
Multivariate Experiment backend creation flow (#7884)
* enable creating multivariate experiments
2022-01-04 15:55:58 +00:00
Michael Matloka
c3612cdabd
Fix EventsTable empty state (#7880) 2022-01-04 09:05:01 -06:00
Karl-Aksel Puulmann
6db2a1f1b9
Make sort order stable (#7883) 2022-01-04 16:33:53 +02:00
Karl-Aksel Puulmann
b431a65cb2
Set ASYNC_MIGRATIONS_DISABLE_AUTO_ROLLBACK (#7881) 2022-01-04 16:15:19 +02:00
Alex Gyujin Kim
84d6383162
Undefined event description crashing recordings page. (#7871)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2022-01-04 07:47:21 -06:00
Harry Waye
a819069128
chore(pdi): add data migration for pdi to pdi2 (#7792)
* chore(pdi): add data migration for pdi to pdi2

This adds an async migration to copy the latest non-deleted
`(team_id, person_id, distinct_id)` tuples from `pdi` to `pdi2`.

Note that this has already be performed for tead_id = 2 on posthog,
cloud so we ensure we're maintaining parity with however this
migration was performed. I've done this by running:

```
SELECT * FROM <old_query>
FULL JOIN <new_query> new
    ON old.distinct_id = new.distinct_id
WHERE old.person_id <> new.person_id
```

specifically for team_id = 2.

* Rename migration

* Skip 0003_fill_person_distinct_id2 on fresh installs

* Clarify version requirements

* Run async migrations using a while-loop instead of tail recursion

Python has a stack limit of 1000, which we might easily run into for
0003 migration

* Use built-in progress tracking

* Make description fit into database 400 char limit

* Add correctness test for new async migration

* Migrate person_distinct_id2 team-by-team

* Remove dead code

* Update migration notes

* Fix foss tests

Co-authored-by: Karl-Aksel Puulmann <oxymaccy@gmail.com>
2022-01-04 15:34:12 +02:00
Neil Kakkar
6724b0a7cc
Cleanup Experiment Result empty state (#7767) 2022-01-04 11:16:34 +00:00
Michael Matloka
365d7b27fc
PostHog demo environment (#7824)
* Remove "Self-Hosted" from logo

* Add new env var-based setting `DEMO`

* Enable recordings in demo project by default

* Merge login and signup into "demo signin" when `DEMO` on

* Show `DEMO` announcement

* Update realm with option `demo`

* Update test_preflight.py

* Improve `realm` typing

* Update E2E test

* Address feedback

* Satisfy mypy
2022-01-03 19:40:52 +01:00
Michael Matloka
5957608588
Make background of insight graphs white (#7806) 2022-01-03 19:12:58 +01:00
Michael Matloka
e2441a71bf
Fix DEBUG mode favicon (#7866) 2022-01-03 10:23:25 -06:00
Tim Glaser
2adc6258d2
Run e2e with clickhouse (#7705)
* Run e2e with clickhouse

* Set kafka to /etc/hosts, and speed up waiting

* fix persons page

* Migrate clickhouse

* Update e2e-test-runner

* Fixes/improvements

* fingers x'ed

* fix

* revert url

* fix demo data

* fix test

* Run Redis in docker

* fix test

* fix redis

* trap

* fix e2e-test-runner

* try localhost instead of kafka

* Revert "try localhost instead of kafka"

This reverts commit 58869c96df.
2022-01-03 14:26:54 +00:00
Michael Matloka
83b8a7dc6b
Revert "ChristmasHog" (#7862)
This reverts commit b9343cffbf.
2022-01-03 12:38:02 +00:00
Karl-Aksel Puulmann
3d8bcdfae0
Kill a dead filter type (#7850) 2021-12-29 08:45:37 +02:00
Karl-Aksel Puulmann
f3fc669cda
Add benchmark for earliest timestamp sql (#7848) 2021-12-28 15:16:47 +02:00
Karl-Aksel Puulmann
f7d9c21dcf
Respect person_distinct_id2 in split_person (#7815)
* Keep person_distinct_id2 in sync on split_person

Follow-up to https://github.com/PostHog/posthog/pull/7671, covering a
new corner case.

* Deprecate some methods

* Handle versioning in split_person

* Select for update
2021-12-27 16:25:20 +02:00
Marius Andra
d30b1f7527
improve text (#7838) 2021-12-27 16:17:10 +02:00
Prithvi Tharun
40f5b1cf3c
Closes 7843 Updated error message (#7844) 2021-12-27 16:16:27 +02:00
Marius Andra
e6c3842d69
Add "save" button to toolbar urls. (#7835)
* adjust edited index when removing rows

* add "save" button
2021-12-23 19:47:40 +01:00
Marius Andra
bf98fbe8ee
development hog icon (#7832) 2021-12-23 14:17:23 +01:00
Marius Andra
29b175c86e
update last_seen_at directly (#7828) 2021-12-23 14:16:47 +01:00
Paolo D'Amico
189ebf6497
Select multiple points at person modal (#7590) 2021-12-22 22:29:02 -06:00
Paolo D'Amico
918f304994
Toolbar launch page (#7807) 2021-12-22 12:40:28 -06:00
Michael Matloka
2177908ced
Feature-case "Actions", "Groups" and "Feature Flags" (#7780) 2021-12-22 11:56:58 -06:00
Marcus Hyett (PostHog)
852c68e866
Make preflight look pretty like PostHog (#7827) 2021-12-22 15:00:44 +00:00
Paul D'Ambra
30ba578ea3
Query events by date for properties known to be dates (#7608)
* query events by date for properties known to be dates

* can't currently import journeys_for helper outside of ee folder

* actually remove the EE import

* even though no values of the specified property were not parseable account for unparseable values

* move tests into EE folder cos they're clickhouse only

* remove new line to take this file out of the PR diff

* use more forgiving ClickHouse datetime function

* wip

* add more tests and rename filters

* Adds a broken date picker behind a feature flag

* Revert "wip"

This reverts commit 6ec1da8744.

* add working basic UI for date selection in taxonomic property filter

* add a failing test by writing a unix timestamp the way the SDK does

* obey mypy

* add awareness of type and format so we can query our $time property as a DateTime in the events api

* hard code property definition in the eventsTableLogic

* Revert "obey mypy"

This reverts commit f09ae4369a.

* hold taxonomic property filter open - but with possible kludge in cohortsModel

* remove my edits to settings

* put back materialization of columns that test snapshots are expecting

* let the datepicker hold the taxonomic pop up open

* update snapshot

* simpler datepicker visibility in filter row

* simplify property type format for unix timestamps

* remove the datepicker now button

* Actually delete all of the drop down held open tests

* Remove leftover `console.log`s

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-12-22 13:58:59 +00:00
Marius Andra
cc1a154e00
disable last_seen_at deadlocks (#7825) 2021-12-22 13:50:16 +01:00
Michael Matloka
5ec51aae2c
Simplify "PostHog Self-Hosted" logo to just "PostHog" (#7822) 2021-12-22 11:39:39 +00:00
Paul D'Ambra
bdfe09a06b
Add type and format to property definition (#7804)
* add property type and format and set them for

* add a failing test

* with passing tests on the ee property definition model

* Add a migration to set  as a DateTime

* Clarify in failing test that it's only list lookup failing

* add empty property definition fields to assertions

* fix merge error

* clarify tests

* add more supported types
2021-12-22 10:48:15 +00:00
Eric Duong
30bedd625a
[fix] Retention line graph modal (#7818)
* in progress

* get index

* change indexing

* format

* add optional index

* labels
2021-12-21 20:23:22 -05:00
Marius Andra
c156b0be5d
Replace old insight table with lemon table (#7817)
* replace old insight table with lemon table

* fix count

* Improve table UI further

* Fix sorting interfering with summary type dropdown

* Use a more appropriate loading state

* Update Cypress test

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-12-21 23:19:23 +01:00
James Greenhill
9a6b837066
Only disable computing of new materialize columns - still use MCs that exist for querying (#7805)
* Only disable computing of new materialize columns - still use MCs that exist for querying

* Rename function to much better function name
2021-12-21 22:13:36 +00:00
Rick Marron
a0603962ca
Add skip inactivity to the recording player (#7793)
* show inactive sections

* skip inactive segments

* prettier didnt run

* make label clickable
2021-12-21 10:39:26 -08:00
Marius Andra
f7b73c470b
Make path cleaning wildcards friendlier (#7803)
* add example

* hide path cleaning rules from settings if no advanced paths
2021-12-21 17:30:07 +01:00
Marius Andra
51b2940ddd
Event properties in filter (#7718)
* create event property model

* add null

* rename cache vars

* update event properties table on ingestion

* match date formats

* match date formats

* better string handling

* property type can be null too

* pass event timestamp

* update property type later

* perform all updates through a buffer object

* move to EventPropertyCounter

* fix migration

* improve flush last seen at job

* flush job periodically + env

* upsert all event properties in 1 query

* log to statsd

* enable property counter only if experimental mode enabled

* use now() instead of event timestamp

* fix seconds

* add user/pass for default postgres

* add tests

* use big integers

* make query work with 50k props

* processing events saves event properties

* fix script

* test date format detection

* default enabled

* only enable event property counter for specific teams

* eslint fixes

* fix logs double-sync noise in tests

* fix bigint test

* don't do tasks that make no sense

* remove dead code

* proof of concept

* remove old <PropertyFilter> component

* change import paths

* event properties sorted by event names

* get event names from actions if used

* scope event property filters by event names

* fix eslint

* simpler test setup

* different contraint name

* refactor team manager

* greatly simplify the system

* fetch cached event properties

* fix team manager and timestamps

* add cached entry

* also don't cache event properties for teams that have it disabled

* remove indexes that are not going to be used

* remove unused imports

* blacked

* remember event properties with a LRU cache

* fix eslint

* clean up the last bits

* remove fields we no longer have

* add some instrumentation to figure out what services we can connect to (helps debug errors locally with kafka)

* Update frontend/src/types.ts

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>

* merge duplicate code

* use the right prop for event names

* mute unseen events, add info icon

* use the event-property tracker also for non-EE clients

* simplify duplicates

* add test for event properties

* add test for non-EE event properties

* add flag

* revert the label and unmute the text

* change the flag to UNSEEN_EVENT_PROPERTIES

* sort by query_usage_30_day again

* Update frontend/src/types.ts

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>

* use None if no event_names

* fix type

* improve pagination test

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-12-21 16:27:12 +00:00
Marius Andra
f3975f6513
Run e2e tests via docker postgres (#7816)
* run e2e tests via docker postgres

* use global vars

* extract database
2021-12-21 17:08:14 +01:00
Marius Andra
d6fc597f97
Throw when trying to save insight with empty filters (#7802)
* do not save insight if filters empty

* fix another test

* add second update guard

* fix errors

* fix test

* fix timezone-dependent test

* fix test

* fix save to dashboard test

* fix the fix
2021-12-21 16:54:42 +01:00
Michael Matloka
688ea4f022
Improve table pagination experience (#7808)
* Upgrade page sizes

* Scroll to the top when the the current page of the table changes
2021-12-21 16:00:55 +01:00
PostHog bot
49be9dccde
Update posthog-js to 1.16.8 (#7814) 2021-12-21 13:03:24 +00:00
Karl-Aksel Puulmann
afce8efafb
Add benchmark for funnel query (#7813)
* Add benchmark for funnel query

Testing new sorting order takes the benchmark from 3.5s -> 1.5s \o/

* Update snapshots
2021-12-21 13:09:00 +02:00
Michael Matloka
bc05903723
Unify "Unique users/groups" casing (#7809) 2021-12-21 08:50:20 +00:00
Eric Duong
558559c5c7
[temp] increase timeout execution query check for retention (#7794)
* increase timeout execution query check

* snapshot

* pass as arg
2021-12-20 19:07:55 -05:00
Michael Matloka
60329d4b63
InsightCard analytics + resizing (#7788)
* Add basic InsightCard analytics

* Allow resizing InsightCard

* Remove extra newline

* Fix InsightCard children

* Get rid of `InsightCard` index
2021-12-20 16:32:51 +00:00