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

7084 Commits

Author SHA1 Message Date
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
Alex Gyujin Kim
2215733e7d
Add spacing for Just Exploring - Onboarding (#8728) 2022-02-23 10:52:07 +01:00
Paul D'Ambra
cca06cc723
update django to satisfy dependabot (#8722) 2022-02-23 09:45:30 +00:00
Rick Marron
3f6c472155
Fix recordings on funnel trends (#8621)
* fix recordings on funnel trends

* update tests

* update snapshots
2022-02-23 01:42:55 -08:00
Paolo D'Amico
9496394952
Remove & clean onboarding-2822 (#8707) 2022-02-23 08:22:01 +01:00
Yakko Majuri
33e09c3a9c
basic next url validation (#8717)
* basic next url validation

* Update frontend/src/scenes/authentication/loginLogic.ts

* Update frontend/src/scenes/authentication/loginLogic.ts
2022-02-22 23:54:31 +00:00
Karl-Aksel Puulmann
9769ef0b5d
Improve backend CI (update .test_timings, run against different CH version) (#8708)
* Make clickhouse server image version configurable

* Attempt to use a reusable workflow for backend tests

* Try a composite action

* Add missing shell: bash

* Temporarily remove a step

* Cache id parameter

* Include the action when needing to rerun

* Move checking migrations to separate file

This didn't work in composite actions tests and slows down every
parallelized test execution for no reason. This should have been
separate in the first place.

* Rename job

* Improve check-migrations

* Start stack in the new job

* Remove shell

* Solve flaky test

* Remove unused file

* Create a test timings job

* Use checkout@v2 - https://github.com/cds-snc/github-actions/issues/23

* Ignore coverage files

* Save backend test durations

* Install pytest-split

* Clean up ci-backend

* Move actions code around

* wording improvement

* Save backend test durations

* Add a comment

* Make it possible to run tests with a different clickhouse version

* Remove debugging code

* Fix typo

* Boolean inputs please work

Fixes overeager test running as per https://github.com/actions/runner/issues/1483

Co-authored-by: PostHog Bot <hey@posthog.com>
2022-02-22 17:06:04 +02:00
Yakko Majuri
aef30d9a41
emit piscina task to reloadSchedule on reload call (#8713) 2022-02-22 15:25:00 +01:00
Yakko Majuri
64eef6d0a1
avoid sending another reloadSchedule task on plugin worker setup (#8694)
* avoid sending another reloadSchedule task on plugin worker setup

* update tests
2022-02-22 13:03:28 +01:00
Yakko Majuri
e4ca77f3f8
fix ch dlq tags error (#8696)
* fix ch dlq tags error

* Update posthog/api/capture.py
2022-02-22 12:16:41 +01:00
Guido Iaquinti
1d1d6d335c
flake8: enable E266,W291,W293,W391,W601 (#8699) 2022-02-21 15:47:27 +01:00
Marius Andra
afeeceddfd
Expand taxonomic filter infinite lists, hide properties not seen on event (#8444)
* option to expand taxonomic filter infinite lists

* make the button blue, update copy

* remove duplicate

* test for is_event_property filter

* fix test

* refactor fetching

* test expandable infinite list

* fix clicking on "$time" in event prop cypress

* remove debug

* fix data-attr

* clean up shared attrs

* test with flag

* use "scoped endpoint" instead of "extended"

* don't click on skeleton

* describe scoped endpoint

* Revert "describe scoped endpoint"

This reverts commit 8450b66ef5.

* describe scoped endpoint

* remove comment

* type div props

* pluralize list

* cleaner variable names

* make sure there's something there

* pluralize some more

* don't tab if we can select something in the list
2022-02-21 08:11:47 +01:00
Tim Glaser
ee71311991
noop 0214 (#8704)
* noop 0214

* No opp tests and ee migration
2022-02-18 21:42:38 +00:00
Alex Gyujin Kim
a88766300e
Add tags back migrations (#8701)
* add tags back migrations

* make tags default None
2022-02-18 21:29:16 +00:00
Alex Gyujin Kim
ca2d7aa411
fix tags (#8703) 2022-02-18 19:21:15 +00:00
Michael Matloka
bfd6af772b
Always remove trailing slash via sceneLogic (#8693)
* Always remove trailing slash via `sceneLogic`

* Update Cypress suite

* Use `replace` instead of `slice`

* Ignore root path
2022-02-18 19:56:07 +01:00
Tim Glaser
e04f2692b0
fix tags issue (#8702)
* fix tags issue

* fix types

* fix
2022-02-18 18:42:31 +00:00
James Greenhill
a451d2f2ce
Hobby: Enable deploying hobby stack behind a firewall with no ACME TLS (#8687) 2022-02-18 10:28:28 -08:00
James Greenhill
24eb2666bb
hobby: Wait for ClickHouse and for Postgres before starting (#8686) 2022-02-18 10:27:45 -08:00
Alex Gyujin Kim
d7a0c10e32
Part 2: Deprecate old tags and upgrade to new tags Backend (#8529) 2022-02-18 08:47:05 -08:00
Guido Iaquinti
ddc260e1f1
Remove flake8-commas (#8695) 2022-02-18 17:20:55 +01:00
Eric Duong
0b4a9f2cf0
Update Breakdown props to use filter groups (#8679)
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2022-02-18 15:28:20 +00:00
Michael Matloka
058b65a525
Automatically switch to the right project if possible (#8681)
* Remove `ObjectExistsInOtherProject`

* Automatically switch to the right project if possible

* Refactor `get_target_queryset` out

* Switch to toast and fix errors

* Add `IconSwapHoriz`

* Break out toast style updates

* Add tests

* Fix typing

* Optimize slightly

* Fix bug with non-numeric pseudo-IDs

* Add  docstring 
2022-02-18 12:47:22 +00:00
Yakko Majuri
571c902a7a
Super Lazy VMs (#8609)
* super lazy vms

* address review

* update tests

* fix typo

* test updates

* ts magic

* sort stuff out

* don't import from another test

* fix lazy tests and hopefully everything will be right in the world

* update teardown tests

* increase timeout in e2e.timeout

* sort imports

* test delay

* import delay

* fix leaky failures and 🚀
2022-02-18 11:52:38 +00:00
Guido Iaquinti
61e8ffb123
.github/workflows/ci-backend.yml: fix flake8 config (#8676) 2022-02-18 11:10:32 +01:00
Rick Marron
8ffcce11a6
Fix recording page refresh loop (#8685) 2022-02-17 17:53:47 -08:00
Paolo D'Amico
15ce33e668
Instance status configuration (#8096)
Co-authored-by: Michael Matloka <dev@twixes.com>
2022-02-17 12:42:43 -07:00
Tiina Turban
f895c61b02
AM: 0003 not required check fix (#8684) 2022-02-17 19:31:42 +01:00
Neil Kakkar
5c5d575939
Rename property group values (#8680)
* 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

* rename property group values

* missed one

* cruft

Co-authored-by: Eric <eeoneric@gmail.com>
2022-02-17 13:25:33 -05:00
Neil Kakkar
101e1c8d1a
Simplification of property groups usage (#8641)
* 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

Co-authored-by: Eric <eeoneric@gmail.com>
2022-02-17 12:46:08 -05:00
Tiina Turban
0fb19f87d7
Check for all necessary migrations completed before worker, plugins start (#8504) 2022-02-17 17:56:24 +01:00
Guido Iaquinti
2f235dfb7a
.flake8: ignore more rules (#8675) 2022-02-17 15:30:21 +00:00
Yakko Majuri
ae2b9a5cc1
fix optimize table timeout on 0002 (#8520)
* fix optimize table timeout on 0002

* refactor

* fixes + optimize last and try-catch

* formatting

* test

* Move env to be normal not dynamic as we don't have access that early

Co-authored-by: Tiina Turban <tiina303@gmail.com>
2022-02-17 15:25:04 +00:00
Guido Iaquinti
c72d230c96
.flake8: move from opt-in to opt-out (#8671) 2022-02-17 14:01:36 +00:00
Yakko Majuri
2fc7306571
reduce maximum retries for exportEvents (#8526)
* reduce maximum retries for exportEvents

* Update plugin-server/src/worker/vm/upgrades/export-events.ts

* fix test

* fix
2022-02-17 13:45:33 +00:00
Yakko Majuri
60586bcf16
track when the promise manager awaits a promise (#8672) 2022-02-17 13:39:17 +00:00
Michael Matloka
c7bdd31673
Fix collaborator bubbles (#8673) 2022-02-17 12:48:21 +00:00
Harry Waye
51f2bceb82
perf(postgresql): remove team_id index on persondistinctids table (#8579)
* perf(postgresql): remove team_id index on persondistinctids table

We have an index on team_id, distinct_id which is already being used. To
avoid the overhead on pdi writes we can remove this index, thereby
reducing the IO we're experiencing on postgresql

Refers to https://github.com/PostHog/product-internal/issues/256

* format

* remove unused import
2022-02-17 12:15:03 +00:00