0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-30 19:41:46 +01:00
Commit Graph

391 Commits

Author SHA1 Message Date
Thomas Obermüller
8ab8741e63
chore(refactor): pythonic schema (#22573) 2024-06-10 15:19:20 +02:00
Marius Andra
3791562e18
fix(hog): modify global objects (#22800) 2024-06-10 09:47:34 +02:00
Marius Andra
45d275c4ee
feat(not-defining): Hog (#22336) 2024-05-28 14:51:45 +02:00
Tom Owers
11ac42dbdc
fix(data-warehouse): Fixed insight filter caching for data warehouse nodes (#22220)
* Fixed insight filter caching for data warehouse nodes

* Fixed tests

* Fixed test
2024-05-09 17:31:40 +02:00
Ben White
cc9cb45d58
feat: Action steps refactor (attempt 2) (#22137) 2024-05-07 15:25:19 +02:00
Ben White
0fc2c9eccd
revert: "feat: Action steps refactor (part1) (#22091)" (#22136) 2024-05-07 12:32:41 +02:00
Ben White
776298d2a8
feat: Action steps refactor (part1) (#22091) 2024-05-07 12:08:13 +02:00
Julian Bez
9576fab1e4
chore: Add Pyupgrade rules (#21714)
* Add Pyupgrade rules
* Set correct Python version
2024-04-25 08:22:28 +01:00
Michael Matloka
b7add1d252
refactor(querying): Consolidate PersonOnEventsMode and PersonsOnEventsMode (#21628)
* Consolidate `PersonOnEventsMode` and `PersonsOnEventsMode`

* Fix multi-line imports too

* Fix member casing

* Fix typing

* Fix some more and update baseline

* Fix `PersonsOnEventsMode` member capitalization
2024-04-19 10:06:55 +02:00
Neil Kakkar
9f43a3f4cd
feat(ci): split out temporal, make tests faster (#21636) 2024-04-18 16:25:33 +01:00
Neil Kakkar
de511eeb89
feat(cohorts): Allow adding property filters to events in cohorts (#21375) 2024-04-15 13:08:17 +01:00
Julian Bez
487ca39064
chore: Enable more ruff rules (#21043) 2024-04-08 16:21:51 +01:00
Michael Matloka
1dcffffa0b
feat(dev): Show Celery cohort queries in CH debug modal (#21173)
* feat(dev): Show Celery cohort queries in CH debug modal

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Add test for `user_id:{self.user.id}`

* Fix args

* Update query snapshots

* Fix typing

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-02 17:56:51 +00:00
timgl
5b67f3301e
fix: Fix automatically materializing columns (#20124) 2024-02-05 11:24:44 +01:00
Bianca Yang
c3623b039f
feat: use feature flag to control whether to quota limit or not (#19996)
* use feature flag to control whether to quota limit or not

* add simple test

* Update query snapshots

* fix up the feature flag activation logic

* confirm that the fixed feature flag logic works

* remove unnecessary change

* Update query snapshots

* Update query snapshots

* fix up tests

* another fix for tests

* Update query snapshots

* still fixing tests

* Update query snapshots

* pr feedback, more tests

* tune up ff enabled call, add capture check to test for quota limit changed

* i really need to run tests locally

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-31 21:37:40 +00:00
Michael Matloka
b93904e1cd
perf(funnels): Deep filtering of person distinct ID join (#20050)
* perf(funnels): Filter person distinct ID join

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-31 11:09:03 +01:00
Juraj Majerik
fe3c85ef9e
feat(experiments): validate events for Funnel experiments (#19988)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-31 08:38:01 +00:00
Julian Bez
7cabe21ae3
chore: Upgrade pydantic, mypy, and others (#19660)
* Upgrade pydantic and all related
* Upgrade mypy
* Add mypy-baseline

To update baseline when you fix something (only then!) use:

    [mypy cmd] | mypy-baseline sync
2024-01-10 08:32:55 +00:00
Marius Andra
96a596274a
fix(insights): breakdown with special properties (#19597) 2024-01-04 16:35:33 +01:00
Michael Matloka
1792ce7f0d
fix(permissioning): Fix restricted projects being visible (#19218)
* Add tests to diagnose the issue

* Add THE test

* Implement the fix

* Update query snapshots

* Update query snapshots

* Ignore mypy's ignorance

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-12 13:52:39 +01:00
Raquel Smith
4c87ff9a33
feat: add membership level to user / person data (#18332)
* add member level to user analytics metadata

* send event when level changed

* fix mypy

* remove org id from properties

* Update query snapshots

* Update query snapshots

* fix tests

* fix tests

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-21 14:58:33 -08:00
Neil Kakkar
f34d89ca1b
fix(flags): Alter constraints to not delete flags and experiments (#18514) 2023-11-21 13:44:16 +00:00
Neil Kakkar
aa6bac9c84
fix(flags): Do the expected for numeric comparisons - FINAL FINAL edition (#18443) 2023-11-08 10:14:01 +00:00
Neil Kakkar
0bdbd253ed
revert: "revert: "revert: "fix(flags): Do the expected for numeric comparisons""" (#18441)
Revert "revert: "revert: "fix(flags): Do the expected for numeric comparisons"" (#18415)"

This reverts commit 7148f03130.
2023-11-07 12:27:26 +00:00
Neil Kakkar
7148f03130
revert: "revert: "fix(flags): Do the expected for numeric comparisons"" (#18415) 2023-11-07 12:07:11 +00:00
Neil Kakkar
30789e6e86
revert: "fix(flags): Do the expected for numeric comparisons" (#18413)
Revert "fix(flags): Do the expected for numeric comparisons (#18359)"

This reverts commit 3847340bb3.
2023-11-06 13:18:49 +00:00
Neil Kakkar
3847340bb3
fix(flags): Do the expected for numeric comparisons (#18359) 2023-11-06 12:55:16 +00:00
Ellie Huxtable
0257b2bcb9
chore: Use ruff formatter (#18207)
* Use ruff formatter

Ruff is now also a formatter! And it runs in a fraction of a second
across our whole codebase vs "I waited more than 30s and cancelled it
because I got bored".

* Config and command -> ruff

* Run 'ruff format .'

* Update query snapshots

* Run 'ruff format .'

* Fix format after commit hook

* Update query snapshots

* Fix type error - ignore comment moved

* Exclude hogql grammar from formatting and reverted grammar

* Run format

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tom Owers <tom@paace.co>
2023-10-31 13:41:57 +00:00
Tom Owers
5513be7731
chore: upgraded Ruff linter (#18188)
* Upgraded Ruff linter

* Formatted whole codebase with new ruff rules

* Revert import removal

* Fixed mypi issues or added ignores

* Fixed schema formatting

* Fixed hogvm failing tests

* Remove duplicate key in list
2023-10-26 12:38:15 +02:00
timgl
476d102411
perf(Persons): Use optimize_aggregation_in_order for person queries (#17817)
* perf(Persons): Use optimize_aggregation_in_order for person queries

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-05 18:47:06 +01:00
Paul D'Ambra
a87b247cd3
feat: step towards feature folders for replay backend (#17484)
* feat: step towards feature folders for replay backend

* Update query snapshots

* Update query snapshots

* that got mypy very excited

* fix

* fix

* fix

* dnagling snapshot

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-18 13:35:59 +01:00
Neil Kakkar
7c9d67e6ff
feat: Allow creating a basic survey from a flag (#17358) 2023-09-13 13:32:16 +00:00
Marius Andra
8316edc87d
feat(hogvm): save bytecode for actions (#16932) 2023-08-10 11:13:03 +02:00
Paul D'Ambra
32b0552a27
fix: posthog insight tests depend on ee code (#16447)
* fix: posthog insight tests depend on ee code

* Update query snapshots

* Update query snapshots

* Update query snapshots

* fuzzy the bear

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-09 14:06:10 +01:00
Neil Kakkar
b0932b3071
feat(experiments): Bring funnel options to the experiment (#16263) 2023-06-29 16:11:15 +00:00
Paul D'Ambra
5b268df29c
feat: allow verified property definitions (#15937)
Today it annoyed me I could verify an event but not a property

Changes
Adds property definition verification, which was mostly copy-pasta from existing code
2023-06-08 11:52:25 +01:00
Frank Hamand
941dedc7a9
feat: Add support for querying different clickhouse hosts per team (#15622)
* Add support for querying different clickhouse hosts per team

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Run formatting

* Fix typing issues

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Add missing argument type

* Fix bad merge

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-05 10:05:13 +01:00
Michael Matloka
39ad3cd68c
feat(actions): Support "Link target contains/matches regex" (#15535)
* Add `ActionStep.href_matching` + `ActionStep.text_matching`

* Use `href_matching` and `text_matching` in matching

* Show new matching options in the UI

* Update query snapshots

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (2)

* Add support in the API

* Fix `LemonLabel` overflow

* Add support in the toolbar

* Update plugin server tests

* Add Django support

* Update query snapshots

* Add Django test

* Don't italicize text input placeholder

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (1)

* Update query snapshots

* Fix typing

* Update query snapshots

* Fix typing more

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (1)

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-25 16:35:02 -07:00
Marius Andra
bd8d4afa6e
feat(insights): trends hogql volume (#15672) 2023-05-25 16:31:35 +01:00
Michael Matloka
bfae851bfd
test(insights): Clean up User Paths tests + snapshot CH queries (#15631)
* Remove `paths_test_factory` layer

* Snapshot paths API ClickHouse queries

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Fix stability of `session_id in [...]`

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-22 11:21:29 +01:00
Yakko Majuri
226caf186e
chore(tests): run poe tests on v2 rather than v1 (#15511)
* chore(tests): run poe tests on v2 rather than v1

* Update query snapshots

* fix

* fix

* make foss tests work

* properly fix foss tests

* Update query snapshots

* final hogql tests fixed

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-16 19:55:32 +00:00
Michael Matloka
6daabb7b36
perf(persons): Prefilter person property conditions for reduced memory usage (#15507)
* perf: Prefilter rows in person search for reduced memory usage

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Better document `aggregate_by_person_version`

* Snapshot queries in more tests

* Use `DIRECT_ON_PERSONS` instead of new arg

* Explain `PersonPropertiesMode` options

* Streamline the various clauses

* Fix formatting

* Add comments and restore join optimization

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Fix comment typo

* Clarify persons-on-events v2

* Reduce parens

* Disambiguate prepends

* Update query snapshots

* Fix unmatched parens

* Update query snapshots

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-15 17:54:51 +02:00
Yakko Majuri
a61087aa1b
fix(poe-v2): fix funnels with cohort breakdowns (#15457)
* fix(poe-v2): fix funnels with cohort breakdowns

* fix properly

* snapshots

* Update query snapshots

* Update query snapshots

* add also_test_with_person_on_events_v2 decorator to relevant tests

* Update query snapshots

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-10 10:45:38 -03:00
Michael Matloka
3e9fd2e49e
refactor(api): Include team and organization in serializer context (#15294)
* refactor(api): Include `team` and `organization` in serializer context

* Optimize team/organization access

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update posthog/api/routing.py

Co-authored-by: Thomas Obermüller <thomas.obermueller@gmail.com>

* Rename `access_team/organization` to `get_*`

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Thomas Obermüller <thomas.obermueller@gmail.com>
2023-05-01 18:55:24 +02:00
Yakko Majuri
b8b132a847
fix(person-query): query cohorts correctly (#15288)
* fix(person-query): query cohorts correctly

* update

* Update query snapshots

* Update query snapshots

* black

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-01 10:25:06 +01:00
Yakko Majuri
016192c8bd
fix(person-query): don't query persons twice if we don't need to (#15265)
* fix(person-query): don't query persons twice if we don't need to

* Update query snapshots

* black

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-26 16:18:54 -03:00
Eric Duong
c85ed33739
fix(cohorts): number cohort version arguments (#15079)
* add indexed arg

* add test

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-13 12:16:51 -04:00
Eric Duong
be9c9c0119
chore(cohorts): directly filter on version of cohort (#15005)
* directly filter on version of cohort

* fix typing

* Update query snapshots

* Update query snapshots

* Update query snapshots

* type mismatch

* type mismatch

* Update query snapshots

* fix tests

* make sure count is calculating based on latest version

* Update query snapshots

* Update query snapshots

* Update query snapshots

* change count back

* Update query snapshots

* Update query snapshots

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-12 11:58:37 -04:00
Eric Duong
3113d97a7a
fix(cohort-query): select materialized properties through the cohort query (#14794)
* propgate materialized properties through the cohort query

* Update query snapshots

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-03-21 00:19:33 +01:00
Yakko Majuri
06d90c35f0
refactor(poe): using_person_on_events -> person_on_events_mode (#14792)
* initial team attr, PersonPropertiesMode refactor

* using_person_on_events -> person_on_events_mode

* fix person_properties_mode signatures, format

* add comment to team

* missing refs

* fix enum

* Update ee/clickhouse/queries/funnels/funnel_correlation.py

* Update ee/clickhouse/queries/funnels/funnel_correlation.py

* fix

* fix

* more fixes

* fix circular import

* add settings

* Update query snapshots

* Update query snapshots

* to enum or not to enum

* Update query snapshots

* Update query snapshots

* Update posthog/queries/trends/trends_event_query_base.py

* Update posthog/test/test_team.py

* Update posthog/queries/foss_cohort_query.py

* Update posthog/queries/foss_cohort_query.py

* Update posthog/queries/foss_cohort_query.py

* Update query snapshots

* Update query snapshots

* more and more fixes

* black

* code quality

* Update query snapshots

* Update query snapshots

* Update posthog/queries/session_recordings/session_recording_list.py

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

* Update posthog/queries/paths/paths_event_query.py

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

* fixes

* argh

* Update query snapshots

* fix test

* fix hogql

* Update posthog/queries/stickiness/stickiness_event_query.py

* fix breakdown

* Update query snapshots

* Update query snapshots

* Update query snapshots

* fix another test

* update base num queries due to extra instance config lookup for poe v2

* black

* sort

* assert num queries test

* Revert "assert num queries test"

This reverts commit c48c7fccf7.

* revert v2 enabled flag as theres no need for it now

* Update query snapshots

* Revert "update base num queries due to extra instance config lookup for poe v2"

This reverts commit 644e9b2658.

* Update query snapshots

* come on its friday lets get greeeeen

* the saga continues

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tiina Turban <tiina303@gmail.com>
2023-03-20 12:03:36 -03:00