You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/04/13 13:32:48 UTC

[superset] branch master updated: chore: Removes the UX_BETA feature flag (#23651)

This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 04bd528bed chore: Removes the UX_BETA feature flag (#23651)
04bd528bed is described below

commit 04bd528bed6d87c43546cd55fee37d991a16829c
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Thu Apr 13 10:32:34 2023 -0300

    chore: Removes the UX_BETA feature flag (#23651)
---
 RESOURCES/FEATURE_FLAGS.md                             |  1 -
 UPDATING.md                                            |  1 +
 .../superset-ui-core/src/utils/featureFlags.ts         |  1 -
 .../DndColumnSelectControl/DndFilterSelect.tsx         |  2 +-
 .../DndColumnSelectControl/DndMetricSelect.tsx         | 18 ++++++++----------
 superset/config.py                                     |  1 -
 superset/connectors/base/models.py                     |  4 ++--
 tests/integration_tests/datasets/api_tests.py          |  2 +-
 tests/integration_tests/datasets/commands_tests.py     |  2 +-
 9 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/RESOURCES/FEATURE_FLAGS.md b/RESOURCES/FEATURE_FLAGS.md
index 13f4754f29..1143f93a78 100644
--- a/RESOURCES/FEATURE_FLAGS.md
+++ b/RESOURCES/FEATURE_FLAGS.md
@@ -61,7 +61,6 @@ These features are **finished** but currently being tested. They are usable, but
 - RLS_IN_SQLLAB
 - SSH_TUNNELING [(docs)](https://superset.apache.org/docs/installation/setup-ssh-tunneling)
 - USE_ANALAGOUS_COLORS
-- UX_BETA
 - VERSIONED_EXPORT
 
 ## Stable
diff --git a/UPDATING.md b/UPDATING.md
index 1a561aed40..f502c6497e 100644
--- a/UPDATING.md
+++ b/UPDATING.md
@@ -48,6 +48,7 @@ assists people when migrating to a new version.
 
 ### Breaking Changes
 
+- [23651](https://github.com/apache/superset/pull/23651) Removes UX_BETA feature flag.
 - [22798](https://github.com/apache/superset/pull/22798): To make the welcome page more relevant in production environments, the last tab on the welcome page has been changed from to feature all charts/dashboards the user has access to (previously only examples were shown). To keep current behavior unchanged, add the following to your `superset_config.py`: `WELCOME_PAGE_LAST_TAB = "examples"`
 - [22328](https://github.com/apache/superset/pull/22328): For deployments that have enabled the "THUMBNAILS" feature flag, the function that calculates dashboard digests has been updated to consider additional properties to more accurately identify changes in the dashboard metadata. This change will invalidate all currently cached dashboard thumbnails.
 - [21765](https://github.com/apache/superset/pull/21765): For deployments that have enabled the "ALERT_REPORTS" feature flag, Gamma users will no longer have read and write access to Alerts & Reports by default. To give Gamma users the ability to schedule reports from the Dashboard and Explore view like before, create an additional role with "can read on ReportSchedule" and "can write on ReportSchedule" permissions. To further give Gamma users access to the "Alerts & Reports" menu and CR [...]
diff --git a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts
index 132d48c7a6..21e0ec279c 100644
--- a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts
+++ b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts
@@ -62,7 +62,6 @@ export enum FeatureFlag {
   THUMBNAILS = 'THUMBNAILS',
   USE_ANALAGOUS_COLORS = 'USE_ANALAGOUS_COLORS',
   TAGGING_SYSTEM = 'TAGGING_SYSTEM',
-  UX_BETA = 'UX_BETA',
   VERSIONED_EXPORT = 'VERSIONED_EXPORT',
   SSH_TUNNELING = 'SSH_TUNNELING',
 }
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx
index b7d5232c20..da9410fcf2 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx
@@ -372,7 +372,7 @@ const DndFilterSelect = (props: DndFilterSelectProps) => {
     const config: Partial<AdhocFilter> = {
       subject: (droppedItem as ColumnMeta)?.column_name,
     };
-    if (config.subject && isFeatureEnabled(FeatureFlag.UX_BETA)) {
+    if (config.subject) {
       config.operator = OPERATOR_ENUM_TO_OPERATOR_TYPE[Operators.IN].operation;
       config.operatorId = Operators.IN;
     }
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
index 32a9c3756b..30904a07ec 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
@@ -315,16 +315,14 @@ const DndMetricSelect = (props: any) => {
       const config: Partial<AdhocMetric> = {
         column: itemValue,
       };
-      if (isFeatureEnabled(FeatureFlag.UX_BETA)) {
-        if (itemValue.type_generic === GenericDataType.NUMERIC) {
-          config.aggregate = AGGREGATES.SUM;
-        } else if (
-          itemValue.type_generic === GenericDataType.STRING ||
-          itemValue.type_generic === GenericDataType.BOOLEAN ||
-          itemValue.type_generic === GenericDataType.TEMPORAL
-        ) {
-          config.aggregate = AGGREGATES.COUNT_DISTINCT;
-        }
+      if (itemValue.type_generic === GenericDataType.NUMERIC) {
+        config.aggregate = AGGREGATES.SUM;
+      } else if (
+        itemValue.type_generic === GenericDataType.STRING ||
+        itemValue.type_generic === GenericDataType.BOOLEAN ||
+        itemValue.type_generic === GenericDataType.TEMPORAL
+      ) {
+        config.aggregate = AGGREGATES.COUNT_DISTINCT;
       }
       return new AdhocMetric(config);
     }
diff --git a/superset/config.py b/superset/config.py
index f67b2f8b81..04e6b48b44 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -459,7 +459,6 @@ DEFAULT_FEATURE_FLAGS: Dict[str, bool] = {
     # Allow users to export full CSV of table viz type.
     # This could cause the server to run out of memory or compute.
     "ALLOW_FULL_CSV_EXPORT": False,
-    "UX_BETA": False,
     "GENERIC_CHART_AXES": True,
     "ALLOW_ADHOC_SUBQUERY": False,
     "USE_ANALAGOUS_COLORS": False,
diff --git a/superset/connectors/base/models.py b/superset/connectors/base/models.py
index a5bea92ffa..30cb5a4030 100644
--- a/superset/connectors/base/models.py
+++ b/superset/connectors/base/models.py
@@ -28,7 +28,7 @@ from sqlalchemy.ext.declarative import declared_attr
 from sqlalchemy.orm import foreign, Query, relationship, RelationshipProperty, Session
 from sqlalchemy.sql import literal_column
 
-from superset import is_feature_enabled, security_manager
+from superset import security_manager
 from superset.constants import EMPTY_STRING, NULL_STRING
 from superset.datasets.commands.exceptions import DatasetNotFoundError
 from superset.models.helpers import AuditMixinNullable, ImportExportMixin, QueryResult
@@ -111,7 +111,7 @@ class BaseDatasource(
     description = Column(Text)
     default_endpoint = Column(Text)
     is_featured = Column(Boolean, default=False)  # TODO deprecating
-    filter_select_enabled = Column(Boolean, default=is_feature_enabled("UX_BETA"))
+    filter_select_enabled = Column(Boolean, default=True)
     offset = Column(Integer, default=0)
     cache_timeout = Column(Integer)
     params = Column(String(1000))
diff --git a/tests/integration_tests/datasets/api_tests.py b/tests/integration_tests/datasets/api_tests.py
index b9d1eb84b6..1762a46305 100644
--- a/tests/integration_tests/datasets/api_tests.py
+++ b/tests/integration_tests/datasets/api_tests.py
@@ -337,7 +337,7 @@ class TestDatasetApi(SupersetTestCase):
             "description": "Energy consumption",
             "extra": None,
             "fetch_values_predicate": None,
-            "filter_select_enabled": False,
+            "filter_select_enabled": True,
             "is_sqllab_view": False,
             "kind": "physical",
             "main_dttm_col": None,
diff --git a/tests/integration_tests/datasets/commands_tests.py b/tests/integration_tests/datasets/commands_tests.py
index 6f5b796c6a..8753b1d273 100644
--- a/tests/integration_tests/datasets/commands_tests.py
+++ b/tests/integration_tests/datasets/commands_tests.py
@@ -137,7 +137,7 @@ class TestExportDatasetsCommand(SupersetTestCase):
             "description": "Energy consumption",
             "extra": None,
             "fetch_values_predicate": None,
-            "filter_select_enabled": False,
+            "filter_select_enabled": True,
             "main_dttm_col": None,
             "metrics": [
                 {