From c27fcb1f46a664058536d131ca30778375b24190 Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" <70410625+michael-s-molina@users.noreply.github.com> Date: Tue, 16 Jan 2024 09:29:41 -0300 Subject: [PATCH] refactor: Removes the deprecated DISABLE_DATASET_SOURCE_EDIT feature flag (#26331) --- RESOURCES/FEATURE_FLAGS.md | 1 - UPDATING.md | 2 ++ .../src/utils/featureFlags.ts | 1 - .../Datasource/DatasourceEditor.jsx | 33 ++++++++----------- .../Datasource/DatasourceEditor.test.jsx | 16 --------- superset/config.py | 1 - superset/views/base.py | 1 - 7 files changed, 16 insertions(+), 39 deletions(-) diff --git a/RESOURCES/FEATURE_FLAGS.md b/RESOURCES/FEATURE_FLAGS.md index d029ca6c3cbd6..da0c50deb6733 100644 --- a/RESOURCES/FEATURE_FLAGS.md +++ b/RESOURCES/FEATURE_FLAGS.md @@ -91,7 +91,6 @@ These features flags currently default to True and **will be removed in a future - DASHBOARD_FILTERS_EXPERIMENTAL - DASHBOARD_NATIVE_FILTERS - DASHBOARD_NATIVE_FILTERS_SET -- DISABLE_DATASET_SOURCE_EDIT - ENABLE_EXPLORE_DRAG_AND_DROP - ENABLE_EXPLORE_JSON_CSRF_PROTECTION - ENABLE_TEMPLATE_REMOVE_FILTERS diff --git a/UPDATING.md b/UPDATING.md index 79c2e09286261..ad18b1e0e6be9 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -29,6 +29,8 @@ assists people when migrating to a new version. ### Breaking Changes +- [26331](https://github.com/apache/superset/issues/26331): Removes the deprecated `DISABLE_DATASET_SOURCE_EDIT` feature flag. The previous value of the feature flag was `False` and now the feature is permanently removed. + ### Potential Downtime - [26416](https://github.com/apache/superset/pull/26416): adds 2 database indexes to report_execution_log and 1 to report_recipient to improve performance, this may cause downtime on large deployments. 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 6bc77e0e87a1a..e3ad0a5d126d6 100644 --- a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts +++ b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts @@ -34,7 +34,6 @@ export enum FeatureFlag { DASHBOARD_VIRTUALIZATION = 'DASHBOARD_VIRTUALIZATION', DASHBOARD_RBAC = 'DASHBOARD_RBAC', DATAPANEL_CLOSED_BY_DEFAULT = 'DATAPANEL_CLOSED_BY_DEFAULT', - DISABLE_DATASET_SOURCE_EDIT = 'DISABLE_DATASET_SOURCE_EDIT', DISABLE_LEGACY_DATASOURCE_EDITOR = 'DISABLE_LEGACY_DATASOURCE_EDITOR', DRILL_TO_DETAIL = 'DRILL_TO_DETAIL', DRILL_BY = 'DRILL_BY', diff --git a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx index 751001297a92a..e4a4d0116a098 100644 --- a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx @@ -629,9 +629,6 @@ class DatasourceEditor extends React.PureComponent { this.setColumns = this.setColumns.bind(this); this.validateAndChange = this.validateAndChange.bind(this); this.handleTabSelect = this.handleTabSelect.bind(this); - this.allowEditSource = !isFeatureEnabled( - FeatureFlag.DISABLE_DATASET_SOURCE_EDIT, - ); this.currencies = ensureIsArray(props.currencies).map(currencyCode => ({ value: currencyCode, label: `${getCurrencySymbol({ @@ -1050,23 +1047,21 @@ class DatasourceEditor extends React.PureComponent { const { datasource } = this.state; return (