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): Revert "feat(flags): Enjoy the benefits of /decide?v=4. $feature_flag_called events contain more details such as flag version" #1842

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

dmarticus
Copy link
Contributor

Reverts #1838

Oof, v4 responses from /decide were not smart about flags that were just straight disabled, let's roll back to v3

Copy link

vercel bot commented Mar 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Mar 21, 2025 0:58am

@dmarticus dmarticus added the bump minor Bump minor version when this PR gets merged label Mar 21, 2025
@dmarticus dmarticus changed the title Revert "feat(flags): Enjoy the benefits of /decide?v=4. $feature_flag_called events contain more details such as flag version" fix(flags): Revert "feat(flags): Enjoy the benefits of /decide?v=4. $feature_flag_called events contain more details such as flag version" Mar 21, 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

This PR reverts the /decide endpoint from v4 back to v3 due to issues with how v4 handled disabled feature flags.

  • Changed /decide/?v=4 back to /decide/?v=3 in src/posthog-featureflags.ts and related test files
  • Removed core-js/features/object/from-entries polyfill from src/entrypoints/array.full.es5.ts as it's no longer needed
  • Updated test assertions across multiple files to expect v3 endpoint URLs instead of v4
  • Maintains backwards compatibility while fixing feature flag handling for disabled flags
  • Test coverage remains comprehensive across different domains and scenarios

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

Copy link
Contributor

@haacked haacked left a comment

Choose a reason for hiding this comment

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

Does this need a bump patch label?

@dmarticus dmarticus added bump patch Bump patch version when this PR gets merged and removed bump minor Bump minor version when this PR gets merged labels Mar 21, 2025
@dmarticus
Copy link
Contributor Author

Does this need a bump patch label?

oh yeah, wrong label

Copy link

Size Change: -22.6 kB (-0.62%)

Total Size: 3.6 MB

Filename Size Change
dist/array.full.es5.js 278 kB -22.6 kB (-7.5%)
ℹ️ View Unchanged
Filename Size
dist/all-external-dependencies.js 220 kB
dist/array.full.js 381 kB
dist/array.full.no-external.js 380 kB
dist/array.js 188 kB
dist/array.no-external.js 187 kB
dist/customizations.full.js 14.1 kB
dist/dead-clicks-autocapture.js 14.5 kB
dist/exception-autocapture.js 9.94 kB
dist/external-scripts-loader.js 2.75 kB
dist/main.js 189 kB
dist/module.full.js 381 kB
dist/module.full.no-external.js 380 kB
dist/module.js 189 kB
dist/module.no-external.js 187 kB
dist/posthog-recorder.js 211 kB
dist/recorder-v2.js 115 kB
dist/recorder.js 115 kB
dist/surveys-preview.js 71.3 kB
dist/surveys.js 76.6 kB
dist/tracing-headers.js 1.76 kB
dist/web-vitals.js 10.4 kB

compressed-size-action

@dmarticus dmarticus merged commit 502c4c0 into main Mar 21, 2025
32 of 33 checks passed
@dmarticus dmarticus deleted the revert-1838-haacked/turn-on-decide-v4 branch March 21, 2025 01:03
haacked added a commit that referenced this pull request Mar 21, 2025
haacked added a commit that referenced this pull request Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants