-
Notifications
You must be signed in to change notification settings - Fork 4
feat: use-context-evaluation-with-newest-engine-version #182
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
base: main
Are you sure you want to change the base?
Conversation
| assert response.status_code == 401 | ||
|
|
||
|
|
||
| def test_get_flags__client_key__hide_disabled_flags_enabled__only_returns_enabled_flags( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I implemented hide_disabled_flags only for client keys. It's ambiguous in Project settings and it does mention that it's to hide the flags from end users.
Let me know if needs to do it for server keys too
| ) -> dict[str, Any] | None: | ||
| return self._environment_cache.get(environment_api_key) | ||
|
|
||
| def get_identity( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be necessary anymore but would appreciate confirmation:
- this was used to have a cache access to server-side identity overrides
- engine now handles these overrides via the environment document
- it keeps the proxy stateless
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature!Closes #168
This PR upgrades the flagsmith-flag-engine from v6.1.0 to v10.0.3 following the approach from flagsmith-python-client#150, and implements the
hide_disabled_flagsproject setting.Changes
Engine Migration (v6 → v10)
flagsmith-flag-enginefrom6.1.0to10.0.3flagsmith>=5dependency for TypedDict models and mappersget_evaluation_result()map_environment_document_to_context()andmap_context_and_identity_data_to_context()from flagsmith-python-clientlist[TraitModel]todict[str, ContextValue]with backward compatibility validatorhide_disabled_flags
filter_disabled_flags()helpersrc/edge_proxy/environments.pyfor both/api/v1/flags/and/api/v1/identities/endpointshide_disabled_flags == trueTests
tests/test_server.pyforhide_disabled_flagsfunctionalityenvironment_with_hide_disabled_flagsintests/fixtures/response_data.pyHow did you test this code?