Skip to content

Conversation

@haacked
Copy link
Collaborator

@haacked haacked commented Jul 11, 2025

Add support for the new "flag" filter type to prevent serialization errors during local feature flag evaluation. Flag dependencies are not yet implemented in local evaluation, so these conditions are skipped to allow other conditions to be evaluated properly.

@haacked haacked requested a review from a team July 11, 2025 02:20
@dmarticus dmarticus moved this to In Review in Feature Flags Jul 11, 2025
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

Added graceful handling of flag dependencies in local feature flag evaluation by skipping unsupported 'flag' type filters to prevent serialization errors.

  • Modified local evaluation logic in posthog/feature_flags.py to handle 'flag' type filters by skipping them with a warning
  • Added test coverage in posthog/test/test_feature_flags.py to verify proper handling of flag dependencies
  • Enhanced error handling to prevent serialization failures when encountering flag-based conditions
  • Maintains backward compatibility by continuing to evaluate other conditions when flag dependencies are encountered

2 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

@github-project-automation github-project-automation bot moved this from In Review to Approved in Feature Flags Jul 11, 2025
@haacked haacked force-pushed the haacked/ignore-flag-dependencies branch from 1a38148 to 5f97812 Compare July 11, 2025 16:31
@haacked haacked enabled auto-merge (squash) July 11, 2025 16:33
@haacked haacked merged commit 6d92479 into master Jul 11, 2025
7 checks passed
@haacked haacked deleted the haacked/ignore-flag-dependencies branch July 11, 2025 16:33
@github-project-automation github-project-automation bot moved this from Approved to Done in Feature Flags Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants