You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
posthog/clickhouse/migrations/0267_wire_up_existing_dmat_string_columns.py, line 108-119 (link)
The comment still says "writable_events lives on DATA in every install" but the fix establishes the opposite for cloud: on cloud, writable_events only exists on INGESTION_EVENTS, not DATA. A reader following the comment will be confused about why DATA was removed from the cloud case.
Prompt To Fix With AI
This is a comment left during a code review.
Path: posthog/clickhouse/migrations/0267_wire_up_existing_dmat_string_columns.py
Line: 108-119
Comment:
The comment still says "writable_events lives on DATA in every install" but the fix establishes the opposite for cloud: on cloud, `writable_events` only exists on `INGESTION_EVENTS`, not `DATA`. A reader following the comment will be confused about why `DATA` was removed from the cloud case.
How can I resolve this? If you propose a fix, please make it concise.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---### Issue 1 of 1
posthog/clickhouse/migrations/0267_wire_up_existing_dmat_string_columns.py:108-119
The comment still says "writable_events lives on DATA in every install" but the fix establishes the opposite for cloud: on cloud, `writable_events` only exists on `INGESTION_EVENTS`, not `DATA`. A reader following the comment will be confused about why `DATA` was removed from the cloud case.
```suggestion# writable_events lives on INGESTION_EVENTS on cloud (added by migration 0232) and on# DATA on non-cloud installs. The two are mutually exclusive: DATA does not host# writable_events on cloud, so we target only the role that actually has the table.# It is a Distributed engine table (not sharded, not replicated), so neither flag# applies — explicit False is required to satisfy the migration convention check.operations += [ run_sql_with_exceptions( ALTER_TABLE_ADD_DMAT_STRING_COLUMNS( table="writable_events", start=_STRING_RANGE_START, end_exclusive=_STRING_RANGE_END, ), node_roles=([NodeRole.INGESTION_EVENTS] if _is_cloud else [NodeRole.DATA]),```
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
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 cannot be applied
Changes
remove DATA node as a target for alter table on writable_events