Repository navigation
chore(clickhouse): run logs kafka ingest on ingestion-apm in prod - #122283
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
😎 Merged successfully - details. |
🤖 CI report
|
There was a problem hiding this comment.
PostHog Review · Standard · reviewed dab50e7: 1 Must fix, 1 Should fix.
This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Risk: No findings This is a ClickHouse migration-only change: it moves the logs Kafka ingest from the ingestion-events nodes to the ingestion-apm nodes in cloud environments (migration 0359, gated to deployed cloud), and updates the HCL manifest, goldens and generated SQL to match what the clusters already run by hand. It contains no attacker-facing surface — static DDL over settings-derived identifiers, with no auth, secrets, or user input involved. No security issues found. Sentinel reviewed |
|
Problem
Changes
apmcompositions now includeroles/coshared/logs_avro_ingest, so the HCL matches the clusters. Dev already had it.0359_logs_ingest_to_apmcreates the ingest onAPMwithIF NOT EXISTS, then drops it fromINGESTION_EVENTSwithIF EXISTS.require_hosts=True, so a topology without apm hosts fails before any drop.writable_logs34stays, so blocks it still queues finish sending. Drop it by hand once its distribution queue is empty.kafka_logs_avronow uses 4 consumers per node in the base layer and inKAFKA_LOGS_AVRO_TABLE_SQL, which matches both prod regions. Dev keeps its own patch.logs34.py.Important
Depends on PostHog/posthog-cloud-infra#11480, which composes
logs_avro_ingestinto the cloud prodapmstacks. The cloud compose gate fails here until that merges. Re-run the gate after it does.Warning
#121979 also adds a
0359migration and still targetsINGESTION_EVENTSfor the prod logs ingest. The PR that lands second renumbers, and #121979 needsAPMfor all cloud envs.Note
The prod-eu
writable_logs34has nobackground_insert_batchsetting, while the golden hasbackground_insert_batch = 1. A Distributed table cannot change settings withALTER, so it converges when the table is next recreated.How did you test this code?
posthog/clickhouse/hcl/check.shpassed locally aftergen-golden.shandgen-sql.sh.check-cloud.sh: the posthog-cloud-infra compose gate composes dev, prod-us and prod-eu with this tree.posthog/clickhouse/test/test_migrations.pypassed locally.Test rationale: No new test.
test_migrations.pyalready checks each deployment branch of a migration forON CLUSTER, andcheck.shguards the HCL composition.👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Release status
Docs update
None.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5
clickhouse-migrations,writing-code-commentsandwriting-pr-descriptions, read from.agents/skills/.