fix(clickhouse): skip migration 0270 outside cloud - #70278
Merged
rorylshanks merged 3 commits intoJul 13, 2026
Conversation
Contributor
|
Reviews (1): Last reviewed commit: "fix self-hosted property values migratio..." | Re-trigger Greptile |
Contributor
🤖 CI reportℹ️ ClickHouse migration SQL — 1 migration(s)ClickHouse migration SQL per cloud environment
|
rorylshanks
marked this pull request as draft
July 12, 2026 08:31
rorylshanks
marked this pull request as ready for review
July 12, 2026 09:34
Contributor
|
Reviews (2): Last reviewed commit: "fix self-hosted migration node role" | Re-trigger Greptile |
|
Note 🤖 stamphog reviewed Gates denied: this is a ClickHouse migration change, which is deny-listed and classified as never-automatable (T2-never) regardless of size — migrations require human review even though a follow-up commit appears to address Greptile's node-role concern.
Gate mechanics and policy version
|
orian
approved these changes
Jul 13, 2026
rorylshanks
enabled auto-merge (squash)
July 13, 2026 08:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Migration 0257 intentionally leaves self-hosted deployments on the original
kafka_property_valuesschema. Migration 0270 ignored that boundary, droppedproperty_values_mv, and then tried to recreate it with the cloud-only schema.Addresses #64148.
Changes
Make migration 0270 a no-op outside US, EU, and DEV, matching migrations 0257 and 0268.
Note
This prevents 0270 from damaging self-hosted installations. It intentionally does not add recovery work for a view already dropped by an earlier failed run.
How did you test this code?
uv run ruff check posthog/clickhouse/migrations/0270_property_values_drop_mv_length_filter.pyuv run ruff format --check posthog/clickhouse/migrations/0270_property_values_drop_mv_length_filter.pyCLOUD_DEPLOYMENTunset and two operations for US, EU, and DEVuv run hogli ci:preflight --fixThe full migration test module could not run from the sparse checkout because the Django settings package was not present.
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Automatic notifications
Docs update
No docs update needed.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Codex used the repository's
/clickhouse-migrationsskill and Ponytail. Investigation showed that the property-count schema change was deliberately cloud-only, so rebuilding the self-hosted Kafka table was unnecessary. The final change only gates 0270 to the same deployments as 0257 and 0268.