Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix mutation types in delete DAG #28110

Merged
merged 9 commits into from
Jan 30, 2025
Merged

fix: fix mutation types in delete DAG #28110

merged 9 commits into from
Jan 30, 2025

Conversation

fuziontech
Copy link
Member

Problem

simple fix for types that break at runtime

Changes

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

How did you test this code?

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR fixes type mismatches in the person deletion DAG (Directed Acyclic Graph) implementation, specifically in the mutation handling logic.

  • Fixed type annotation in wait_for_delete_mutations from Mutation to ShardMutations (Dict[int, Mutation])
  • Updated implementation to properly iterate over all shard mutations instead of handling a single mutation
  • Added proper handling of empty mutation cases in delete_person_events
  • Aligned mutation handling with the actual multi-shard architecture of ClickHouse
  • Improved type safety while maintaining backward compatibility with existing deletion verification process

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

dags/deletes.py Outdated Show resolved Hide resolved
dags/deletes.py Outdated Show resolved Hide resolved
posthog/clickhouse/cluster.py Show resolved Hide resolved
dags/deletes.py Outdated Show resolved Hide resolved
dags/deletes.py Outdated Show resolved Hide resolved
@fuziontech fuziontech enabled auto-merge (squash) January 30, 2025 20:32
@fuziontech fuziontech merged commit 937fa79 into master Jan 30, 2025
92 checks passed
@fuziontech fuziontech deleted the type_fixes_deletes branch January 30, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants