Previously every login/shared dashboard/page load request loaded
team independent of whether it's needed or not.
This makes it so we only load the team here when SELF_CAPTURE is turned
on (i.e. only during dev)
* WIP: port process_math to support materialized columns
* Add skipped test showing trend breakdowns dont use materialized columns
* Simplify testing and test&fix math property aggregation w/ materialized columns
* Add (failing) test for filtering with materialized action props
* Add test around materialized property filtering
* Refactor entity.math materialization impl
* Make trends breakdowns work with materialized columns
* Simplify process_math further
* Handle denormalized properties in format_action_filter for step.properties
Note the following files all called this method:
ee/clickhouse/views/events.py
ee/clickhouse/views/actions.py
ee/clickhouse/queries/trends/util.py
ee/clickhouse/queries/trends/lifecycle.py
ee/clickhouse/queries/trends/breakdown.py
ee/clickhouse/queries/funnels/base.py
ee/clickhouse/queries/sessions/util.py
ee/clickhouse/queries/clickhouse_stickiness.py
ee/clickhouse/queries/clickhouse_retention.py
ee/clickhouse/models/cohort.py
I verified all of them are OK since they query events table directly
with the passed filter
* Handle materialized $current_url in action step filtering
* Remove now unneeded clause
* Update test helper
* Allow denormalized props for filtering with breakdowns
* Allow denormalized props for filtering with lifecycle
* Allow denormalized props for some views
* Fix entity math yet again
* Query materialized columns in insights > sessions
* Handle breakdown edge case
* Allow denormalized props for more views
* PR feedback
* reformat
* Hide "Dropped off" for the initial funnel step
* Clean funnels styling up
* Fix horizontal bars mode styling
* Adjust for #5605
* Show "completed step" percentage for all steps again
* Add test cases for calculation of cohort-based cohorts
* Add cyclic dependency test
* Add support for cohort-based cohorts
* Reraise error in `calculate_people_ch` to fail loudly
* Use feedback
* Update `test_error_while_calculating`
* Move CH test case to CH suite
* Fix funnels and code formatting
* Cache action lookups on entity
* Avoid mutating filters
* Single-line a long query line
* Calculate columns to select from table dynamically
* Rename class to ColumnOptimizer
* Improve typing
* Set logic
* Rename var
* Fetch funnel top values via materialized columns
* Add a cast
* Simplify, fix
* Move types to more logical place
* Add tests for ColumnOptimizer
* Tidy code
* Test whether elements_chain is needed or not
* No caching in tests
* Use `ColumnOptimizer` in trends
* Prepend commas
* Fix event_query tests
* Handle another edge case around elements_chain
* Handle funnel exclusions
* Add documentation around trickier pieces of logic
* Comment out a broken case for now
* Make backend responses for comparison/lifecycle more consistent
Closes https://github.com/PostHog/posthog/issues/4718
* Remove unused vars
* Restore frontend hacks
Don't worry, they'll go away soon again!
* Updated deployment instructions in readme
and made a few minor tweaks to functionality to highlight data warehouses
* minor wording change
Co-authored-by: Tiina Turban <tiina303@gmail.com>
* readme tweaks
* tweak sentence
Co-authored-by: Tiina Turban <tiina303@gmail.com>
Co-authored-by: kunal <kunal@Kunals-iMac.hsd1.ca.comcast.net>
* Include the set of organizations for an instance in a report
* use correct python black version
* include license keys as well
* include in telem payload
* remove organizations from summary
Co-authored-by: kunal <kunal@Kunals-iMac.hsd1.ca.comcast.net>
For some reason, this test has been failing reliably the past day,
returning 2 people instead of 1.
The culprit should be https://github.com/PostHog/posthog/pull/5572 but
not sure why tests passed on that branch?
* WIP: Migration to migrate person_distinct_id to CollapsingMergeTree
* Improve migrations
* Another attempt at migration
Using nullable otherwise it defaults without the default 😅
* Linter approved
* Update test code
* Fix testing issues
* Fix dev.Dockerfile
See https://github.com/PostHog/posthog/pull/5609 for why this broke
Bullseye has libpq-dev version 13 and apt doesn't support version ranges
so removing the package version seems all we can do 😅
* Pin version to bypass linter
* load the funnel after the logic mounts, not after the component
* move logicFromInsight to another file to avoid recursive imports of funnelLogic and insightLogic
* take last applied filters directly from results
* fix type
* more meaningful default key
* add some props (WIP)
* only run insight query start/end tracking if on insights
* fix some types
* load the funnel only if valid to do so; prevents initial "loaded, but error" state
* remove debug
* still call startQuery/endQuery on insightLogic
* convert dashboardLogic to TS
* fix more ts errors
* fix more TS errors
* save last used filters with results
* fix type import path for typegen
* Extract method from funnels code
* Add failing test case for using denormalized property in a funnel breakdown
* Handle materialized event properties in funnel breakdown
* Refactor property lookups
* Use denormalized properties in paths
* Update validation tests
* Update validation tests
* Fix a broken test
* Move test around
* Type python Property.type
* Type Filter.breakdown_type in python
* Fix typing issue in actions view
* Type python Filter.insight
* Type python Filter.display
* Type python Filter.interval, fix resulting typing errors
* Type python funnel Filter.layout
* Type python funnel Filter.funnel_window_interval_unit
* Type python Filter.retention_type
* Type python funnel Filter.funnel_window_interval_unit_ch
* Type python path Filter.path_type
* Type python path Filter.target_event
* Type Entity.type
* Type python Property.operator
* custom tooltip component and typing for actions
* change delay to 500ms
* cautionary comment
* debouncing visible
* dont introduce new html element into tooltip, use cloneElement instead
* add prop types and default override prop to tooltip
* Improve insight refreshing UX
* Clean up
* Make sure `ComputationTimeAndRefresh` is on the right in Trends too
* Fix typing and some inconsistencies
* Remove unused const
* Update test_clickhouse_insights.py
* Update decorators.py
* Refactor `ComputationTimeWithRefresh` into own file