0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-30 19:41:46 +01:00
posthog/ee/api/test
Harry Waye 2baddd59fb
perf(events): limit select clause when getting ingest requirements (#8381)
* perf(events): limit select clause when getting ingest requirements

Previously we were pulling in all table columns for every event posted
to the `/e/` column. We actually only need the id, such that we can
associate an event with a `Team`, and a setting which says if we should
anonymize ip addresses.

There are still other optimizations to make, and some of the code paths
do several queries to the database, but I have limited the changes here
to just the most straight forward of them.

Refers to https://github.com/PostHog/posthog/issues/8378

* Add a little comment

* Filter by team_id

* Avoid changing error messages

* Update import get_team -> get_ingest_context

* Fix typing

* fix types

* fix mocking

* fix type

* Rename InjestContext -> EventIngestContext

* Update ingestion context fetch methods

* Further rename fetch functions
2022-02-02 13:46:44 +00:00
..
fixtures
__init__.py
base.py Experimentation API pay gate (#8172) 2022-01-21 09:55:22 -06:00
test_authentication.py
test_capture.py perf(events): limit select clause when getting ingest requirements (#8381) 2022-02-02 13:46:44 +00:00
test_dashboard.py Migrate dashboard-related logics to be project-based (#6623) 2021-10-25 16:16:55 +02:00
test_event_definition.py Add verified properties to event definitions (#8081) 2022-01-18 08:38:55 -06:00
test_hooks.py
test_license.py
test_organization.py Update BE tracking to use groups (#7355) 2021-11-30 10:58:37 +02:00
test_property_definition.py Deprecates property_type_format (#8292) 2022-02-01 14:08:55 +00:00
test_team_memberships.py Don't allow user to set current team that they don't have access to (#8256) 2022-01-26 16:35:49 +00:00
test_team.py Warn when dashboard is available (#8262) 2022-01-27 18:49:29 +00:00