Conversation
Contributor
There was a problem hiding this comment.
PR Summary
This PR decouples feature flag local evaluation from personal API keys and adds remote config payload decryption without requiring the feature flags poller.
- Added
enable_local_evaluationparameter (defaults to True) inposthog/client.pyto optionally disable local feature flag evaluation - Version bump to 6.1.0 in
posthog/version.pyreflecting new feature addition - Modified poller initialization in
posthog/client.pyto only start when local evaluation is enabled - Added new test coverage in
posthog/test/test_client.pyfor remote config payload handling without local evaluation - Maintains backward compatibility while offering more efficient SDK usage when only remote config payloads are needed
5 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile
| @@ -1,3 +1,7 @@ | |||
| # 6.1.0 - 2025-01-07 | |||
|
|
|||
| 1. feat: decouple feature flag local evaluation from personal API keys; support decrypting remote config payloads without relying on the feature flags poller | |||
Contributor
There was a problem hiding this comment.
style: Numbering list items (1.) is inconsistent with other feature entries in changelog that use dashes (-)
Comment on lines
+63
to
+65
| # Whether to enable feature flag polling for local evaluation by default. Defaults to True. | ||
| # We recommend setting this to False if you are only using the personalApiKey for evaluating remote config payloads via `get_remote_config_payload` and not using local evaluation. | ||
| enable_local_evaluation = True # type: bool |
Contributor
There was a problem hiding this comment.
style: default bool settings should follow the pattern DEFAULT_ENABLE_LOCAL_EVALUATION = True to match Python conventions. Current mutable module-level variable can be modified accidentally
Suggested change
| # Whether to enable feature flag polling for local evaluation by default. Defaults to True. | |
| # We recommend setting this to False if you are only using the personalApiKey for evaluating remote config payloads via `get_remote_config_payload` and not using local evaluation. | |
| enable_local_evaluation = True # type: bool | |
| # Whether to enable feature flag polling for local evaluation by default. Defaults to True. | |
| # We recommend setting this to False if you are only using the personalApiKey for evaluating remote config payloads via `get_remote_config_payload` and not using local evaluation. | |
| DEFAULT_ENABLE_LOCAL_EVALUATION = True # type: bool |
Contributor
Author
There was a problem hiding this comment.
nope wrong; this is a config entry you IDIOT
andyzzhao
approved these changes
Jul 10, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Parity with the Node SDK changes I made here