69 Commits

Author SHA1 Message Date
Matt Brooker
96db6a8370 feat: Add organization-level default for IP data anonymization (#40902)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-06 10:37:16 -03:00
Meikel Ratz
6f34e5b92d feat(cdp): adjust it to use cohorts for behavioral consumer (#40555)
Co-authored-by: Ben White <ben@posthog.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-05 12:01:10 +01:00
Meikel Ratz
b7cd7812bb feat(messaging): add cohort membership consumer and migrations (#39561) 2025-10-16 09:13:23 +02:00
Meikel Ratz
fc60c1537d feat(myke): reverts add cohort membership consumer (#39536) 2025-10-13 10:28:01 +02:00
Meikel Ratz
f92814332c feat(myke): add cohort membership consumer (#39391) 2025-10-13 09:48:47 +02:00
Meikel Ratz
39a19fa595 feat(myke): revert add cohort membership consumer (#39369) 2025-10-09 10:56:06 +02:00
Meikel Ratz
87094a9bec feat(myke): add cohort membership consumer (#38649) 2025-10-09 10:02:05 +02:00
Nick Best
c268e4a327 feat(persons): use sqlx for persons migrations (#37463) 2025-10-07 15:52:56 -07:00
Tue Haulund
518484ecc3 feat: dynamic retention period for replay recordings (#36307) 2025-08-22 14:16:57 +02:00
Meikel Ratz
aea455d612 chore(msg): revert pg partitioning changes for counters db (#36772) 2025-08-18 17:13:10 +02:00
Meikel Ratz
85a9b28cc0 fix(myke): fix failing test bc of missing field (#36776) 2025-08-18 16:59:51 +02:00
Meikel Ratz
b42eaad737 feat(msg): try table partitioning by team (#36578) 2025-08-14 09:38:28 +02:00
Meikel Ratz
a02b409543 feat(msg): add pg migrate to plugin-server (#36431) 2025-08-11 15:22:08 +02:00
Peter Kirkham
401f3c36be feat: new prices (#36329) 2025-08-07 21:02:16 +00:00
Rafael Audibert
c63bcb7a57 feat(devex): Bump prettier and kea-typegen (#36064) 2025-08-02 18:06:15 +02:00
Meikel Ratz
8db62a4bda feat(cdp): add behavioural consumer (#35181) 2025-07-21 11:20:27 +02:00
José Sequeira
7330ed0e3d fix: Remove distinct id mapping upon person refresh on merge (#35054)
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-15 16:21:37 +00:00
Paweł Ledwoń
9d2e6b5f04 feat: implement dropping old events in ingestion (#34224) 2025-07-10 15:39:41 +02:00
José Sequeira
03e58ef12b fix(plugin-server): fix double members_can_use_personal_api_keys entry (#34755) 2025-07-09 08:21:14 +00:00
José Sequeira
e97ff7fef9 feat(persons): Produce to kafka during flush (#34725) 2025-07-09 08:47:54 +02:00
Nick Best
12321ab121 fix(cdp): mv hardcoded topics to env vars (#34739) 2025-07-08 13:58:43 -07:00
José Sequeira
b9e6d86025 fix(ingestion-e2e): make e2e-tests less flaky (#33848) 2025-06-18 12:04:10 +02:00
Ben White
92a52a9642 feat(cdp): Added check for non paying destinations (#33722) 2025-06-17 11:14:57 +02:00
jabahamondes
d17bec6843 feat(web-analytics): add base_currency settubg to Team level (#33263)
Co-authored-by: Javier Bahamondes <javierbahamondes@Javiers-MacBook-Pro.local>
2025-06-06 13:58:06 +00:00
José Sequeira
ac1d29261b chore(plugin-server): Refactor functional_tests (#32757)
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-06-02 14:00:13 +02:00
Robbie
06cc44b04a feat: Move team resolution before batching events by distinct ID (#32521)
Co-authored-by: Paweł Ledwoń <me@difficult.name>
2025-05-26 18:46:40 +01:00
Paweł Ledwoń
4e83591d19 refactor: split out persons postgres (#31099) 2025-05-01 20:47:46 +02:00
Ben White
e8bc1b250a feat: Rollout lazy team loader (#31559) 2025-04-24 14:25:36 +02:00
Ben White
c92116f7cb revert: "feat: Rollout lazy team loader (#31176)" (#31556) 2025-04-24 11:20:16 +00:00
Ben White
0cdaaaf312 feat: Rollout lazy team loader (#31176)
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-04-24 12:19:02 +02:00
Ben White
924ee1d43d feat(cdp): Use lazy loader for hog functions (#30235) 2025-03-21 12:16:49 +01:00
Ben White
ced2292f81 fix(node): Failing tests due to bigint migration (#30199) 2025-03-20 12:38:27 +01:00
Ben White
541a1bedcd fix(cdp): Action loading (#29805) 2025-03-12 10:11:24 +01:00
Ben White
9d46b776ff fix(node): Improve the way we compile and run tests (#27695) 2025-01-22 12:04:59 +00:00
Michael Matloka
d801027fb2 refactor(ingestion): Make group type project-based (read/write) (#25876) 2024-11-12 14:35:47 +01:00
Michael Matloka
12ff477551 refactor(group-analytics): Add project field to group type (#25600)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-01 00:12:28 +01:00
Bianca Yang
6acfaf55f5 feat: Final piece of deprecating available features, DB references (#22402)
* remove db ref

* update the migration

* remove referencess from test fixture jsons

* some more removals

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update UI snapshots for `chromium` (1)

* Update query snapshots

* fix migration

* add reverse sql

* fix the migration

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update query snapshots

* i think i finally fixed the migration issue

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* update migration post merge

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-30 16:41:22 +00:00
Bianca Yang
9dd22a3757 feat: Deprecate available_features pt 2 (#22373)
* everything except plugin server and sync_available_features

* sync_available_features_done, some plugin_server done?

* and a tiny bit more

* linting

* try to fix some tests

* more test fixes/

* clean up typos

* weed wacking bugs

* more test shenanigans

* fix plugin server

* actually fix plugin server test?

* still fixing tests

* another attempt

* some pr feedback

* small fix

* fix database query accessor

* fix functional tests

* fix tests

* Update query snapshots

* Update query snapshots

* Update query snapshots

* update some comments and fxn names

* fix plugin server test

* Update query snapshots

* Update query snapshots

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-28 17:29:24 -07:00
Ben White
224a5d5d0c feat: Action steps refactor (part 2) (#22092) 2024-05-08 09:46:52 +02:00
Brett Hoerner
ddd0a05884 feat(plugin-server): lazy distinct_id/person row creation (#21670)
* split out InternalPerson and Person types

* disable old backfill code

* add lazy person env var setting

* lazily create person/distinct_id rows

* remove backfill.ts

* drop properties after person lookup

* remove leftover backfill bit
2024-04-23 10:39:40 -06:00
Michael Matloka
f02d045bf9 chore(environments): Add migration to backfill projects (#20887)
* chore(environments): Add migration to backfill projects

* Fix `noop`

* Add `project_id` to plugin server test setup

* Fix `project_id`

* Also add `posthog_project` to plugin server tests

* Update `createTeam`

* Fix func tests
2024-03-14 13:45:28 +01:00
ted kaemming
9299aa09e5 fix(plugin-server): Remove Postgres-based plugin error logging in favor of existing ClickHouse-based approaches (#18764) 2023-11-27 10:41:36 -08:00
Xavier Vello
1b6628055d feat(plugin-server): allow to use several PG connection pools (#17001)
Co-authored-by: Tiina Turban <tiina303@gmail.com>
2023-08-24 11:09:10 +02:00
Harry Waye
9f0cf9f40f chore: make attachement test less flakey
We do this by making sure the plugin config and the attachement are
committed together.
2023-07-11 14:08:29 +00:00
Tiina Turban
d78680c976 chore: Remove lazy person container (#15286) 2023-05-22 13:51:07 +02:00
Harry Waye
ed876aa40e fix: for empty group props (#14243)
* fix: for empty group props

We were failing if the props were empty.

* refactor: make property definitions db dependencies explicit

We were relying on implicit details setup via `resetTestDatabase` which
makes it hard to reason about what's going on. It also uses hard coded
ideas which limits our ability to isolate tests properly, which would
help both for writing tests with confidence that they are correct, and
for adding for example parallelism.

* add test
2023-02-15 15:39:20 +00:00
Harry Waye
ac6b863c73 refactor: remove timekeeper, use jest fake timers, create hub once (#14166)
This removes the timekeeper library and uses jest fake timers instead.
This also creates the hub once and reuses it for all tests, which is
faster than creating a new hub for each test.
2023-02-09 11:30:41 +00:00
Yakko Majuri
90f1b16285 feat(ingestion): remove postgres dependency from capture endpoint (#12802)
* add support for token field in kafka message

* formPipelineEvent

* rename pipeline files according to new order

* wip team_id and anonymize ips

* conditional handlers and tests

* some plugin server fixes

* fix capture bug

* fix

* more fixes

* fix capture tests

* pipeline update

* fix + investigate database resets

* fix import order

* testing and typing updates

* add test for capture endpoint

* testing

* python typing

* plugin server test

* functional test

* fix test

* another fix

* make sure no team ids clash in tests

* fix

* add more metrics and logs

* cache nulls

* updates

* add more metrics
2022-11-23 09:55:26 -03:00
Harry Waye
cc2f424452 chore(plugins-server): use Kafka to buffer app jobs requests (#12345)
* chore(plugins-server): use Kafka to buffer app jobs requests

To remove the dependency on the Graphile Worker database on things that
may be requesting app job runs we push the jobs to a Kafka topic.

* chore: use KAFKA_JOBS instead of string literal `'jobs'`

* chore: rename startJobsBufferConsumer -> startJobsConsumer

* avoid checking eventId

* fix lint

* fix producer wrapper tests

* fix retries test

* handle offset sync

* wip

* wip

* remove exports

* do better

* use Producer not wrapper

* reset db

* mock once

* Add test for raising to the consumer

* Update plugin-server/tests/main/ingestion-queues/run-async-handlers-event-pipeline.test.ts

Co-authored-by: Yakko Majuri <38760734+yakkomajuri@users.noreply.github.com>

* and in the darkness bind them

* fix tests

* don't forget the name update!

* rename DependencyError to DependencyUnavailable

* separate dlq

* update comment

Co-authored-by: Yakko Majuri <38760734+yakkomajuri@users.noreply.github.com>
2022-10-28 11:05:15 +01:00
Harry Waye
62d9c20a90 chore(plugin-server): use DELETE instead of TRUNCATE (#12393)
* chore(plugin-server): use DELETE instead of TRUNCATE

Truncate seems a little slow. Other options to consider:

 1. PostgreSQL fsync settings in tests
 2. using tmpfs for "persistence"
 3. use transaction/rollback: not totally sure we'd be able to do this
    in our tests but may be worth a try.

* wip

* wip

* set fsync=off

* Delete all tables in current schema

* don't bother with fsync=off
2022-10-25 09:15:53 +00:00