0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 09:14:46 +01:00
Commit Graph

12 Commits

Author SHA1 Message Date
Michael Matloka
bfa3b801d2
feat(activity-log): Log if activity was completed by PostHog staff using impersonation (#19657)
* Move "impersonated_session" to a context processor

* Add field `was_impersonated` to `ActivityLog`

* Fix `cannot_be_both_system_and_staff` constraint

* Fix `log_insight_activity`

* Update activityLogMocks.ts

* Update plugin.py

* Update test_migrations_are_safe.py

* Fix log_activity helpers

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Remove constraint

* Fix `ExportedAssetSerializer`

* Update query snapshots

* Update UI snapshots for `chromium` (1)

* Add integrity check

* Fail activity logging loudly in tests

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-11 13:33:10 +01: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
Marius Andra
9c501a1535
feat(data-management): remove event volume and query usage calculation (#16475) 2023-07-11 12:14:37 +02: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
Paul D'Ambra
74c79fb3a5
feat: data management property activity log (#14899)
* feat: add property definition history tracking

* correct api.ts types

* highlight on deleted and on property definition type looks weird

* update activity assertions
2023-04-24 12:18:18 +01:00
Karl-Aksel Puulmann
a62555a230
chore: rename is_event_property from property definitions API (#13838)
* Rename is_event_property API response value

* is_event_property parameter -> filter_by_event_names

* Add missing test

* Remove some illegal tests
2023-01-23 10:59:37 +02:00
Neil Kakkar
2b370c2d1a
fix(data-management): Allow property type updates (#10897) 2022-07-20 13:55:25 +01: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
Paul D'Ambra
5f7d3c566d
Deprecates property_type_format (#8292)
* remove property_type_format concept

* remove nulls from tests

* deprecate not remove (and see what tests fail)

* plugin server tests care about property_type_format

* fix tests
2022-02-01 14:08:55 +00:00
Paul D'Ambra
bdfe09a06b
Add type and format to property definition (#7804)
* add property type and format and set them for

* add a failing test

* with passing tests on the ee property definition model

* Add a migration to set  as a DateTime

* Clarify in failing test that it's only list lookup failing

* add empty property definition fields to assertions

* fix merge error

* clarify tests

* add more supported types
2021-12-22 10:48:15 +00:00
Marius Andra
51b2940ddd
Event properties in filter (#7718)
* create event property model

* add null

* rename cache vars

* update event properties table on ingestion

* match date formats

* match date formats

* better string handling

* property type can be null too

* pass event timestamp

* update property type later

* perform all updates through a buffer object

* move to EventPropertyCounter

* fix migration

* improve flush last seen at job

* flush job periodically + env

* upsert all event properties in 1 query

* log to statsd

* enable property counter only if experimental mode enabled

* use now() instead of event timestamp

* fix seconds

* add user/pass for default postgres

* add tests

* use big integers

* make query work with 50k props

* processing events saves event properties

* fix script

* test date format detection

* default enabled

* only enable event property counter for specific teams

* eslint fixes

* fix logs double-sync noise in tests

* fix bigint test

* don't do tasks that make no sense

* remove dead code

* proof of concept

* remove old <PropertyFilter> component

* change import paths

* event properties sorted by event names

* get event names from actions if used

* scope event property filters by event names

* fix eslint

* simpler test setup

* different contraint name

* refactor team manager

* greatly simplify the system

* fetch cached event properties

* fix team manager and timestamps

* add cached entry

* also don't cache event properties for teams that have it disabled

* remove indexes that are not going to be used

* remove unused imports

* blacked

* remember event properties with a LRU cache

* fix eslint

* clean up the last bits

* remove fields we no longer have

* add some instrumentation to figure out what services we can connect to (helps debug errors locally with kafka)

* Update frontend/src/types.ts

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>

* merge duplicate code

* use the right prop for event names

* mute unseen events, add info icon

* use the event-property tracker also for non-EE clients

* simplify duplicates

* add test for event properties

* add test for non-EE event properties

* add flag

* revert the label and unmute the text

* change the flag to UNSEEN_EVENT_PROPERTIES

* sort by query_usage_30_day again

* Update frontend/src/types.ts

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>

* use None if no event_names

* fix type

* improve pagination test

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-12-21 16:27:12 +00:00
Paolo D'Amico
73809d54b1
Fix EE serializer for EventDefinition (last seen at) (#7580) 2021-12-08 09:03:34 -07:00