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

7121 Commits

Author SHA1 Message Date
Karl-Aksel Puulmann
2bb411b526
Sharding: async migration to move to sharded schema (#8783)
* Start migration for replicated schema

* ATTACH/DETACH

* Make table engines lazy

* Validate how many replicas in cluster

* use settings object

* Add tests for the new async migration

* Make zookeeper path in tests unique

Otherwise we're consistently running into errors around the zookeeper
path being reused as zookeeper isn't cleaned up on DELETE

* Verify table counts

* Stop materialized columns while migrating

* Validate more preconditions for replicated schema migration

* Snapshot tests for schema

* Add a is_required test

* Mock uuid generation in test_schema.py

* Update test_migrations_not_required

* Improve comment around constraints

* Update snapshot tests

* Make running tests more reliable

* Add a comment

* Make use of precheck

* Add TEST check for precheck, as per discussion

* Update import
2022-03-03 12:40:18 +02:00
Neil Kakkar
e6a756e4a2
fix(events): load more events button sometimes vanishes (#8813) 2022-03-03 11:10:21 +01:00
Paul D'Ambra
dda69eb438
fix: move taxonomic filter tooltip into input suffix (#8816)
* fix: move taxonomic filter tooltip into input suffix

* remove unnecessary span and padding
2022-03-03 09:32:45 +01:00
Harry Waye
3ad5609e56
dev(codespaces): fix clickhouse volume paths (#8817)
As part of yeetcode I think we accidentally broke some of the volume
path loading for clickhouse, this just reverts.

Refers to
a71e899605 (diff-67a4805fdcc6145d7b3ada2a6099a9b2e91c9d0fd108c22f95d2f01d219793d1)
2022-03-02 15:25:12 +00:00
dependabot[bot]
82c1484fe1
Bump follow-redirects from 1.14.7 to 1.14.9 (#8811)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.9.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.9)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 15:34:35 +01:00
Michael Matloka
d7067544ad
Fix is_active being unused when querying User (#8793)
* Fix `is_active` being unused when querying `User`

* Simplify a `.filter()`

* Update test_feature_flag.ambr

* Remove `User.is_active` filter from `get_overridden_feature_flags`

* Fix exclude in `OrganizationMemberViewSet` queryset

* Revert snapshot update

* Update test_organization_members.py
2022-03-02 14:27:08 +00:00
Yakko Majuri
240ed011e5
add metric on posthog.capture inside plugins (#8810) 2022-03-02 14:14:53 +00:00
Eric Duong
69d3fce869
Filter groups simplify (#8683)
* initial working for trends with simplify

* simplify logic only if property_groups exists

* purge empty clauses

* fix tests

* fix snapshots

* update subquery logic

* update snapshots

* update snapshots

* columnoptimizer

* combine tests

* proof of concept simplification

* diff snapshots

* fix tests

* helpers and property_groups everywhere

* update snapshots

* fix simplify

* type

* missing argument

* add old properties back to simplify logic

* resolve merge conflicts, address few comments

* wip cleanup

* rm simplify filters

* redo removal

* update snapshots

* last snapshot

* update snapshot

* allow groups for breakdown props

* simplify

* fix foss tests

* run

* change groups to values

* change groups to values

* renaming

* add snapshots and test account logic

* Update posthog/models/filters/mixins/simplify.py

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>

* make sure propertygroup objects can be directly parsed

* add one test

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2022-03-02 08:59:54 -05:00
Paul D'Ambra
b614c2897e
Better describe points in time in the web performance view (#8759)
* describe point in time markers

* only have one way of triggering mouseover popups in the one component

* describe the new popup prop

* add first contentful paint marker content

* if it's width call it width

* move max width for performance page pop-ups to css

* return null instead of empty react fragment
2022-03-02 13:20:51 +00:00
Karl-Aksel Puulmann
5f3673750e
Clean up conftest.py (#8806)
* Remove ee/conftest

This was duplicated during yeetcode, causing issues when refactoring it

* Remove test-specific setup code

* Share conftests better
2022-03-02 14:02:55 +02:00
Neil Kakkar
109c7629d1
Fix broken time-dependent tests (#8809) 2022-03-02 11:15:46 +00:00
Paolo D'Amico
92e3f6db4a
Add ID to dashboard view events (#8659) 2022-03-01 18:45:43 -06:00
Alex Gyujin Kim
1c6c80dbec
New Events Definitions page (#8689) 2022-03-01 16:41:15 -08:00
Tim Glaser
3281688b03
Fix person CSV export (#8785)
- Make sure we send properties to the request
- Massively limit the amount of data we fetch to avoid timeouts (exporting 10k events goes from 20 seconds to 1 second)
- Add ?limit params so people can fetch more data at once with the api
- Explain to users in frontend that we only export 10k lines
2022-03-02 00:10:21 +00:00
Alex Gyujin Kim
608a3b1e6e
Use lib import - fixes broken Jest tests (#8800) 2022-03-01 23:59:45 +00:00
Neil Kakkar
2b174e03da
Support new style property groups in ColumnOptimizer and person property pushdowns (#8697)
* update column optimizer and person property pushdowns to use property groups

* remove dict changes for now

* ensure running one file doesnt delete other snapshots

* one more snapshot

* wip: address comments

* wip - use outer prop groups everywhere with exclude mode

* don't touch correlation props in this PR

* save breakdown file

* add default optimizer instance

* select inner fields on person query that will be used for outer filtering to avoid subqueries

* fix confusing logic

* restore cohort logic

* change condition

* remove all but one instance of exclude and clean up

* rename direct properties mode

* clean up, and add test for funnel event query as well

* fix tests. ugly test-order dependency

* remove exclude

* restore

* trigger tests

Co-authored-by: eric <eeoneric@gmail.com>
2022-03-01 13:54:13 -05:00
Li Yi Yu
06669e210d
Or filtering UI (#8766)
* or filtering ui

* fixes

* address comments

* hold off from functionality implementation

* rename things

* undo remove typing

* values not groups

* fixed the wrong thing

* fix
2022-03-01 10:41:34 -05:00
Yakko Majuri
5416d78fcd
add one more ingestion backpressure metric for comparison (#8784) 2022-03-01 14:59:14 +00:00
Yakko Majuri
67ba234237
add ingestion metric using increment (#8779) 2022-03-01 11:47:10 +00:00
Karl-Aksel Puulmann
401e6f5932
Make CLICKHOUSE_REPLICATION work correctly (#8730)
* Refactor table engine logic

This brings us closer to having production and local schemas in sync

* Raise an error if running async migration but events table is distributed

* Use django.conf settings

* Remove unneeded debug code

* Make EVENTS_TABLE_MV_SQL lazy

* Make events data table name dynamic

* Make event inserts, mv table lazy

* Refactor table engines code (again)

* Schema for writable_events and events distributed tables

* Session recordings sharding support in schema

* test_schema cleanup

* fixup session recordings schema

* Fix CLICKHOUSE_REPLICATED migrations

* Skip ch migration 0016 on CLICKHOUSE_REPLICATED

* Search the right db

* Do operations in right order for session recording events

* CREATE DATABASE before the first migration

* Add parens
2022-03-01 13:08:53 +02:00
Michael Matloka
d331a61092
Fix Popup animation when the overlay is above reference (#8765) 2022-03-01 10:06:10 +01:00
Michael Matloka
29b183c9ab
Add Figma link reminder to PR template (#8764) 2022-03-01 08:54:48 +01:00
Paolo D'Amico
f6d26ccb71
Release 1.33.0 (#8773) 2022-02-28 17:28:23 -06:00
Rick Marron
792373810a
Add project homepage (behind FF) (#8711)
* add project homepage behind ff

* update ff owner

* clean up merge
2022-02-28 13:32:02 -08:00
Paolo D'Amico
e08976e88a
Fix async migrations banner on Cloud (#8774) 2022-02-28 21:31:04 +00:00
Tiina Turban
36f9a44bc9
Async migrations to have separate status (#8772)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2022-02-28 14:20:56 -06:00
Yakko Majuri
7f2a2b23cd
Add link to async migrations (#8762)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2022-02-28 13:43:59 -06:00
Michael Matloka
fadedacbd6
Fix determination of what dashboard collaborators have _implicit_ access (#8769) 2022-02-28 17:53:57 +00:00
Tim Glaser
90d30c3e60
Plugins: replace @current with team_id in api calls (#8751)
* Plugins: replace @current with team_id in api calls

* prettier

* Fix test

* reallyf ix test
2022-02-28 17:29:01 +00:00
Yakko Majuri
378809998a
track when a plugin drops an event so we don't ingest it (#8767)
* track when a plugin drops an event so we don't ingest it

* Update plugin-server/src/main/ingestion-queues/ingest-event.ts

Co-authored-by: Tiina Turban <tiina303@gmail.com>

Co-authored-by: Tiina Turban <tiina303@gmail.com>
2022-02-28 17:21:15 +00:00
Tim Glaser
c1a2bad819
Add annotations to bar chart (#8747)
Co-authored-by: Alex Kim <alexgkim205@gmail.com>
2022-02-28 16:58:30 +00:00
Alex Gyujin Kim
019c1f203a
Remove untyped Line Graph version (#8705)
* remove FF

* typecheck
2022-02-28 15:02:04 +01:00
Marius Andra
f7c133e8fc
Include a link to coding conventions (#8744)
* include a link to coding conventions, change some other words

* Replace "Follow" with "Stay up-to-date-with"

Co-authored-by: Michael Matloka <dev@twixes.com>
2022-02-28 09:17:25 +00:00
Li Yi Yu
15c2118a3f
Experiment secondary metric results UI (#8506)
* split files up

* clean up various experiment states

* return secondary results with results

* fix funnel add step, remove required marks, display metrics results properly

* linting

* secondary metrics when no results yet

* fix yucky loading in between experiment states

* typescript fix

* undo backend changes

* load secondary metrics one at a time and spinner

* prettier and fix test

* fix backend test

* linting

* fix spinner

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2022-02-27 11:35:13 -05:00
Paul D'Ambra
af824a778b
Tidy up web performance page sections (#8758)
* add info to web perf page header

* add collapsing panel around dumped performance json
2022-02-27 14:05:35 +00:00
Paul D'Ambra
839fdfe681
set decimal places to 1 for all numbers in web performance pop over (#8757) 2022-02-27 12:11:56 +00:00
Tim Glaser
e714a81300
Organize api docs tags differently (#8752) 2022-02-25 15:35:07 +00:00
Karl-Aksel Puulmann
d7d2bcb7a3
Fix python manage.py migrate_clickhouse --plan (#8741)
Currently this would throw on a fresh install with an error similar to

```
│ posthog-events Migration would get applied: 0024_materialize_window_and_session_id                    │
│ posthog-events Traceback (most recent call last):                                                     │
│ posthog-events   File "manage.py", line 21, in <module>                                               │
│ posthog-events     main()                                                                             │
│ posthog-events   File "manage.py", line 17, in main                                                   │
│ posthog-events     execute_from_command_line(sys.argv)                                                │
│ posthog-events   File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", li │
│ posthog-events     utility.execute()                                                                  │
│ posthog-events   File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", li │
│ posthog-events     self.fetch_command(subcommand).run_from_argv(self.argv)                            │
│ posthog-events   File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 3 │
│ posthog-events     self.execute(*args, **cmd_options)                                                 │
│ posthog-events   File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 3 │
│ posthog-events     output = self.handle(*args, **options)                                             │
│ posthog-events   File "/home/posthog/code/ee/management/commands/migrate_clickhouse.py", line 41, in  │
│ posthog-events     self.migrate(CLICKHOUSE_HTTP_URL, options)                                         │
│ posthog-events   File "/home/posthog/code/ee/management/commands/migrate_clickhouse.py", line 57, in  │
│ posthog-events     sql = getattr(op, "_sql")                                                          │
│ posthog-events AttributeError: 'RunPython' object has no attribute '_sql'
```

This is due to the command not working with `RunPython` commands.
2022-02-25 16:51:22 +02:00
Tim Glaser
e44757a87d Fix documentation sentry errors 2022-02-25 14:26:43 +00:00
Eric Duong
a25caf50dd
Static cohort api return (#8735) 2022-02-24 19:08:23 +01:00
Guido Iaquinti
8c355b5a37
Python: use version 3.8.12 (#8677) 2022-02-24 17:49:55 +01:00
Marius Andra
7994c31dfa
validate redirect URL (#8729) 2022-02-24 10:13:21 +01:00
Yakko Majuri
ec9b6db963
fix resume api for async migrations (#8739)
* fix resume api for async migrations

* update

* Update posthog/async_migrations/runner.py

* Update posthog/async_migrations/runner.py

* black
2022-02-24 10:13:01 +01:00
Alex Gyujin Kim
12f87e2233
Fix formatting of retention line graph (#8731) 2022-02-24 09:58:00 +01:00
Yakko Majuri
cc4e57f0c1
add f string to optimize (#8740) 2022-02-24 09:34:41 +01:00
Rick Marron
bcdd49a93a
Fix persons page refresh loop: take 2 (#8688)
* Fix recording page refresh loop: take 2

* clean up
2022-02-24 00:57:14 +01:00
Neil Kakkar
65b6c6448a
Release experimentation (#8732) 2022-02-23 16:14:37 +01:00
Michael Matloka
b679bc3d68
Fix dashboard permissions (#8734)
* Fix dashboard permissions

* Use `===`
2022-02-23 10:33:21 +00:00
Michael Matloka
cff1152e25
Add dashboard-permissions to PERSISTED_FEATURE_FLAGS (#8727)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2022-02-23 11:13:05 +01:00
Alex Gyujin Kim
ca00edfa96
React child weirdness (#8724) 2022-02-23 10:52:46 +01:00