-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
feat: feature flag configurable custom backend #16618
Conversation
Codecov Report
@@ Coverage Diff @@
## master #16618 +/- ##
==========================================
+ Coverage 76.76% 76.83% +0.07%
==========================================
Files 1004 1005 +1
Lines 53967 54014 +47
Branches 7335 7337 +2
==========================================
+ Hits 41430 41504 +74
+ Misses 12298 12270 -28
- Partials 239 240 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I think this feature flag backend would also need to be able to evaluate all feature flags to send via bootstrap here. Otherwise, you'd still need to define a Update: |
Actually that's a good point, I made a refactor on this PR to directly override |
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.
LGTM
LGTM |
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.
LGTM with a few miniscule nit suggestions 👍
Co-authored-by: Ville Brofeldt <[email protected]>
Co-authored-by: Ville Brofeldt <[email protected]>
* feat: feature flag configurable custom backend * fix lint * simpler approach * fix tests * revert dependency updates * Update superset/utils/feature_flag_manager.py Co-authored-by: Ville Brofeldt <[email protected]> * Update superset/config.py Co-authored-by: Ville Brofeldt <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]> (cherry picked from commit f2bc139)
* feat: feature flag configurable custom backend * fix lint * simpler approach * fix tests * revert dependency updates * Update superset/utils/feature_flag_manager.py Co-authored-by: Ville Brofeldt <[email protected]> * Update superset/config.py Co-authored-by: Ville Brofeldt <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]>
* feat: feature flag configurable custom backend * fix lint * simpler approach * fix tests * revert dependency updates * Update superset/utils/feature_flag_manager.py Co-authored-by: Ville Brofeldt <[email protected]> * Update superset/config.py Co-authored-by: Ville Brofeldt <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]>
SUMMARY
Add the possibility to override
is_feature_enabled
instead ofget_feature_flags
, the later when using a feature flag management system, would force all feature flags to be evaluated when evaluating a single feature.IS_FEATURE_ENABLED_FUNC and GET_FEATURE_FLAGS_FUNC should be mutually exclusive (but not obligatory) has stated on the config comments, this is because
get_feature_flags
will callis_feature_enabled
to make the API consistent and safe to get all feature flags and be sure that all gets applied on the override.Introduces a new Config key:
IS_FEATURE_ENABLED_FUNC
: Callable that overrides currentis_feature_enabled
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
@jfrag1