You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/10/29 22:07:26 UTC
[GitHub] [incubator-superset] ktmud commented on pull request #11496: chore: Cleaning up ENABLE_REACT_CRUD_VIEWS config
ktmud commented on pull request #11496:
URL: https://github.com/apache/incubator-superset/pull/11496#issuecomment-719051689
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 `is_feature_enabled` to support env variables in a unified way:
```python
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
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org