Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(data-warehouse): send group property updates with person processing on (#89082)

Tom Owersb62cfd31094c
diff --git a/products/warehouse_sources/backend/temporal/data_imports/person_property_update_consumer.py b/products/warehouse_sources/backend/temporal/data_imports/person_property_update_consumer.py
index b8ff49dfb0fd..448501fd6617 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/person_property_update_consumer.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/person_property_update_consumer.py
@@ -139,15 +139,18 @@ def build_capture_kwargs(payload: dict[str, Any]) -> dict[str, Any]:
group_key = payload.get("group_key")
if not group_type or not group_key:
raise InvalidPersonPropertyMessage("group message missing group_type or group_key")
- # Mirror the canonical group-identify write (ee/clickhouse/views/groups.py::trigger_group_identify):
- # distinct_id is the team-uuid placeholder, group type is the name, process_person_profile=False.
+ # distinct_id is the team-uuid placeholder, group type is the name. Person processing must
+ # stay on: ingestion drops any $groupidentify whose $process_person_profile is false
+ # (warning invalid_event_when_process_person_profile_is_false) and gates the group upsert
+ # on it, so with false the write silently never happens. The cost is one placeholder
+ # person per team — the same trade the server SDKs' group_identify makes per group.
return {
"token": token,
"event_name": "$groupidentify",
"event_source": event_source,
"distinct_id": str(distinct_id),
"properties": {"$group_type": group_type, "$group_key": str(group_key), "$group_set": properties},
- "process_person_profile": False,
+ "process_person_profile": True,
}
return {
"token": token,
diff --git a/products/warehouse_sources/backend/temporal/data_imports/person_property_update_consumer_test.py b/products/warehouse_sources/backend/temporal/data_imports/person_property_update_consumer_test.py
index c9bdb5448ecd..3e4f5e8996e6 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/person_property_update_consumer_test.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/person_property_update_consumer_test.py
@@ -41,7 +41,9 @@ class TestBuildCaptureKwargs:
def test_group_message_maps_to_groupidentify(self):
# Regression: a group message must become a $groupidentify with $group_type/$group_key/$group_set
- # and process_person_profile=False, mirroring the canonical group-identify write.
+ # and process_person_profile=True. With false, ingestion drops the event before the group
+ # upsert (invalid_event_when_process_person_profile_is_false), so the sync reports success
+ # while writing nothing to the group.
kwargs = build_capture_kwargs(
{
"token": "tok",
@@ -59,7 +61,7 @@ class TestBuildCaptureKwargs:
"event_source": EVENT_SOURCE,
"distinct_id": "team-uuid",
"properties": {"$group_type": "organization", "$group_key": "acme", "$group_set": {"plan_tier": "pro"}},
- "process_person_profile": False,
+ "process_person_profile": True,
}
@parameterized.expand(