From f8d25612ba6c7a6ce61ba97c2c52d372c0dc870e Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" <70410625+michael-s-molina@users.noreply.github.com> Date: Wed, 17 Jan 2024 16:29:08 -0300 Subject: [PATCH] refactor: Removes the deprecated REMOVE_SLICE_LEVEL_LABEL_COLORS feature flag (#26346) --- RESOURCES/FEATURE_FLAGS.md | 1 - UPDATING.md | 1 + superset/config.py | 1 - superset/dashboards/api.py | 8 -------- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/RESOURCES/FEATURE_FLAGS.md b/RESOURCES/FEATURE_FLAGS.md index bb1fc6204..bfd78bbb7 100644 --- a/RESOURCES/FEATURE_FLAGS.md +++ b/RESOURCES/FEATURE_FLAGS.md @@ -91,5 +91,4 @@ These features flags currently default to True and **will be removed in a future - ENABLE_TEMPLATE_REMOVE_FILTERS - GENERIC_CHART_AXES - KV_STORE -- REMOVE_SLICE_LEVEL_LABEL_COLORS - VERSIONED_EXPORT diff --git a/UPDATING.md b/UPDATING.md index eb9717eeb..531ae1312 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -31,6 +31,7 @@ assists people when migrating to a new version. ### Breaking Changes +- [26346](https://github.com/apache/superset/issues/26346): Removes the deprecated `REMOVE_SLICE_LEVEL_LABEL_COLORS` feature flag. The previous value of the feature flag was `False` and now the feature is permanently removed. - [26348](https://github.com/apache/superset/issues/26348): Removes the deprecated `CLIENT_CACHE` feature flag. The previous value of the feature flag was `False` and now the feature is permanently removed. - [26349](https://github.com/apache/superset/issues/26349): Removes the deprecated `DASHBOARD_CACHE` feature flag. The previous value of the feature flag was `False` and now the feature is permanently removed. - [26369](https://github.com/apache/superset/issues/26369): Removes the Filter Sets feature including the deprecated `DASHBOARD_NATIVE_FILTERS_SET` feature flag and all related API endpoints. The feature is permanently removed as it was not being actively maintained, it was not widely used, and it was full of bugs. We also considered that if we were to provide a similar feature, it would be better to re-implement it from scratch given the amount of technical debt that the current implementation has. The previous value of the feature flag was `False` and now the feature is permanently removed. diff --git a/superset/config.py b/superset/config.py index 9cf53da06..cd78ef372 100644 --- a/superset/config.py +++ b/superset/config.py @@ -431,7 +431,6 @@ DEFAULT_FEATURE_FLAGS: dict[str, bool] = { "PRESTO_EXPAND_DATA": False, # Exposes API endpoint to compute thumbnails "THUMBNAILS": False, - "REMOVE_SLICE_LEVEL_LABEL_COLORS": False, # deprecated "SHARE_QUERIES_VIA_KV_STORE": False, "TAGGING_SYSTEM": False, "SQLLAB_BACKEND_PERSISTENCE": True, diff --git a/superset/dashboards/api.py b/superset/dashboards/api.py index 25570e91b..783543e45 100644 --- a/superset/dashboards/api.py +++ b/superset/dashboards/api.py @@ -438,14 +438,6 @@ class DashboardRestApi(BaseSupersetModelRestApi): try: charts = DashboardDAO.get_charts_for_dashboard(id_or_slug) result = [self.chart_entity_response_schema.dump(chart) for chart in charts] - - if is_feature_enabled("REMOVE_SLICE_LEVEL_LABEL_COLORS"): - # dashboard metadata has dashboard-level label_colors, - # so remove slice-level label_colors from its form_data - for chart in result: - form_data = chart.get("form_data") - form_data.pop("label_colors", None) - return self.response(200, result=result) except DashboardAccessDeniedError: return self.response_403()