-
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
chore: Cleaning up ENABLE_REACT_CRUD_VIEWS config #11496
chore: Cleaning up ENABLE_REACT_CRUD_VIEWS config #11496
Conversation
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, thanks for the cleanup!
# Enables the replacement react views for all the FAB views (list, edit, show) with | ||
# designs introduced in SIP-34: https://github.com/apache/incubator-superset/issues/8976 | ||
# This is a work in progress so not all features available in FAB have been implemented |
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.
Should we move these comments to the feature flag lines?
30c3edb
to
39e076d
Compare
Codecov Report
@@ Coverage Diff @@
## master #11496 +/- ##
===========================================
- Coverage 66.64% 56.43% -10.21%
===========================================
Files 863 407 -456
Lines 41230 13741 -27489
Branches 3719 3502 -217
===========================================
- Hits 27477 7755 -19722
+ Misses 13653 5819 -7834
- Partials 100 167 +67
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
The CI is breaking probably because of this: https://github.com/apache/incubator-superset/blob/39e076d0566b12c115c6098fe5adaadec9cb7176/tests/superset_test_config.py#L76 I think we should clean this up and update def is_feature_enabled(self, feature: str) -> bool:
"""Utility function for checking whether a feature is turned on"""
env_key = f"SUPERSET_{feature}"
if env_key in os.env:
return True
feature_flags = self.get_feature_flags()
if feature_flags and feature in feature_flags:
return feature_flags[feature]
return False |
39e076d
to
8c476b3
Compare
@@ -55,6 +55,7 @@ | |||
"KV_STORE": True, | |||
"SHARE_QUERIES_VIA_KV_STORE": True, | |||
"ENABLE_TEMPLATE_PROCESSING": True, | |||
"ENABLE_REACT_CRUD_VIEWS": os.environ.get("ENABLE_REACT_CRUD_VIEWS", False), |
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.
@ktmud this should hopefully resolve the issue.
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.
Still think it is worth having a generalized way to override feature flags via env variables. But I guess this works, too.
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.
nice! 🚢
Co-authored-by: John Bodley <john.bodley@airbnb.com>
SUMMARY
Now that
ENABLE_REACT_CRUD_VIEWS
is behind a feature flag (#11371) there seems to be merit in deprecating the config parameter with the same name (DRY) and using the feature flag framework to check the status, otherwise you'll likely need to override this in two places.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
CI.
ADDITIONAL INFORMATION