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(flags): fix broken boolean flag usage tab when null values are present #28242

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

havenbarnes
Copy link
Contributor

Problem

Context: https://posthoghelp.zendesk.com/agent/tickets/24210

This is a regression caused by https://github.com/PostHog/posthog/pull/27888/files

Changes

This changes both boolean and multivariant flags to render the raw $feature_flag_response value in query results

There is no value in transforming the $feature_flag_response value in query - it makes SDK behavior far more opaque and makes data seem unreliable as the activity tab will show different results than the Usage tab for a flag

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

Yes

How did you test this code?

Edited the failed query in user's project in posthog debugger and made sure results are accurate for both boolean and multivariant flags:
Screenshot 2025-02-03 at 1 48 58 PM

@havenbarnes havenbarnes requested a review from dmarticus February 3, 2025 21:53
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 a regression in the feature flag usage tab by displaying raw $feature_flag_response values instead of transforming boolean values, ensuring consistent behavior between activity and usage tabs.

Key changes:

  • Removes unnecessary boolean value transformation in query results for feature flags
  • Maintains raw $feature_flag_response values for both boolean and multivariate flags
  • Improves transparency of SDK behavior by showing actual flag response values
  • Ensures data consistency between activity tab and usage tab displays
  • Fixes regression introduced in PR chore(flags): tweak boolean flag usage table response values #27888 affecting boolean flag value display

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

Copy link
Contributor

github-actions bot commented Feb 3, 2025

Size Change: -5 B (0%)

Total Size: 1.16 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.16 MB -5 B (0%)

compressed-size-action

@havenbarnes havenbarnes enabled auto-merge (squash) February 4, 2025 03:10
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