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/26 12:51:56 UTC
[superset] branch master updated: chore: Deprecates 3.0 consented feature flags (#23785)
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 aa2edfc506 chore: Deprecates 3.0 consented feature flags (#23785)
aa2edfc506 is described below
commit aa2edfc5063e16d9296b8c35d570dbef3a9904ef
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Wed Apr 26 09:51:46 2023 -0300
chore: Deprecates 3.0 consented feature flags (#23785)
---
RESOURCES/FEATURE_FLAGS.md | 15 +++++++--------
UPDATING.md | 1 +
.../superset-ui-core/src/utils/featureFlags.ts | 1 -
.../components/SliceHeader/SliceHeader.test.tsx | 12 ------------
.../src/dashboard/components/gridComponents/Chart.jsx | 13 ++-----------
.../src/dashboard/util/getSliceHeaderTooltip.tsx | 7 +------
superset/config.py | 19 +++++++++----------
7 files changed, 20 insertions(+), 48 deletions(-)
diff --git a/RESOURCES/FEATURE_FLAGS.md b/RESOURCES/FEATURE_FLAGS.md
index 60f58a5fea..bd932fd25f 100644
--- a/RESOURCES/FEATURE_FLAGS.md
+++ b/RESOURCES/FEATURE_FLAGS.md
@@ -27,17 +27,11 @@ These features are considered **unfinished** and should only be used on developm
[//]: # "PLEASE KEEP THE LIST SORTED ALPHABETICALLY"
-- CLIENT_CACHE
-- DASHBOARD_CACHE
-- DASHBOARD_NATIVE_FILTERS_SET
-- DISABLE_DATASET_SOURCE_EDIT
- DRILL_BY
- ENABLE_ADVANCED_DATA_TYPES
-- ENABLE_EXPLORE_JSON_CSRF_PROTECTION
- ENABLE_TEMPLATE_REMOVE_FILTERS
- KV_STORE
- PRESTO_EXPAND_DATA
-- REMOVE_SLICE_LEVEL_LABEL_COLORS
- SHARE_QUERIES_VIA_KV_STORE
- TAGGING_SYSTEM
@@ -51,8 +45,6 @@ These features are **finished** but currently being tested. They are usable, but
- ALLOW_FULL_CSV_EXPORT
- CACHE_IMPERSONATION
- CONFIRM_DASHBOARD_DIFF
-- DASHBOARD_EDIT_CHART_IN_NEW_TAB
-- DASHBOARD_FILTERS_EXPERIMENTAL
- DASHBOARD_VIRTUALIZATION
- DRILL_BY
- DRILL_TO_DETAIL
@@ -98,5 +90,12 @@ These features flags currently default to True and **will be removed in a future
[//]: # "PLEASE KEEP THE LIST SORTED ALPHABETICALLY"
+- CLIENT_CACHE
+- DASHBOARD_CACHE
+- DASHBOARD_FILTERS_EXPERIMENTAL
- DASHBOARD_NATIVE_FILTERS
+- DASHBOARD_NATIVE_FILTERS_SET
+- DISABLE_DATASET_SOURCE_EDIT
+- ENABLE_EXPLORE_JSON_CSRF_PROTECTION
- GENERIC_CHART_AXES
+- REMOVE_SLICE_LEVEL_LABEL_COLORS
diff --git a/UPDATING.md b/UPDATING.md
index 12e69b3738..1d5f938515 100644
--- a/UPDATING.md
+++ b/UPDATING.md
@@ -24,6 +24,7 @@ assists people when migrating to a new version.
## Next
+- [23785](https://github.com/apache/superset/pull/23785) Deprecated the following feature flags: `CLIENT_CACHE`, `DASHBOARD_CACHE`, `DASHBOARD_FILTERS_EXPERIMENTAL`, `DASHBOARD_NATIVE_FILTERS`, `DASHBOARD_NATIVE_FILTERS_SET`, `DISABLE_DATASET_SOURCE_EDIT`, `ENABLE_EXPLORE_JSON_CSRF_PROTECTION`, `REMOVE_SLICE_LEVEL_LABEL_COLORS`. It also removed `DASHBOARD_EDIT_CHART_IN_NEW_TAB` as the feature is supported without the need for a feature flag.
- [23652](https://github.com/apache/superset/pull/23652) Enables GENERIC_CHART_AXES feature flag by default.
- [23226](https://github.com/apache/superset/pull/23226) Migrated endpoint `/estimate_query_cost/<int:database_id>` to `/api/v1/sqllab/estimate/`. Corresponding permissions are can estimate query cost on SQLLab. Make sure you add/replace the necessary permissions on any custom roles you may have.
- [22809](https://github.com/apache/superset/pull/22809): Migrated endpoint `/superset/sql_json` and `/superset/results/` to `/api/v1/sqllab/execute/` and `/api/v1/sqllab/results/` respectively. Corresponding permissions are `can sql_json on Superset` to `can execute on SQLLab`, `can results on Superset` to `can results on SQLLab`. Make sure you add/replace the necessary permissions on any custom roles you may have.
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 2627a42369..fbb1efd340 100644
--- a/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts
+++ b/superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts
@@ -25,7 +25,6 @@ export enum FeatureFlag {
ALLOW_FULL_CSV_EXPORT = 'ALLOW_FULL_CSV_EXPORT',
CLIENT_CACHE = 'CLIENT_CACHE',
DASHBOARD_CROSS_FILTERS = 'DASHBOARD_CROSS_FILTERS',
- DASHBOARD_EDIT_CHART_IN_NEW_TAB = 'DASHBOARD_EDIT_CHART_IN_NEW_TAB',
DASHBOARD_FILTERS_EXPERIMENTAL = 'DASHBOARD_FILTERS_EXPERIMENTAL',
CONFIRM_DASHBOARD_DIFF = 'CONFIRM_DASHBOARD_DIFF',
DASHBOARD_NATIVE_FILTERS = 'DASHBOARD_NATIVE_FILTERS',
diff --git a/superset-frontend/src/dashboard/components/SliceHeader/SliceHeader.test.tsx b/superset-frontend/src/dashboard/components/SliceHeader/SliceHeader.test.tsx
index f1aacd79e0..570b7a7813 100644
--- a/superset-frontend/src/dashboard/components/SliceHeader/SliceHeader.test.tsx
+++ b/superset-frontend/src/dashboard/components/SliceHeader/SliceHeader.test.tsx
@@ -303,18 +303,6 @@ test('Display cmd button in tooltip if running on MacOS', async () => {
).toBeInTheDocument();
});
-test('Display correct tooltip when DASHBOARD_EDIT_CHART_IN_NEW_TAB is enabled', async () => {
- window.featureFlags.DASHBOARD_EDIT_CHART_IN_NEW_TAB = true;
- const props = createProps();
- render(<SliceHeader {...props} />, { useRedux: true, useRouter: true });
- userEvent.hover(screen.getByText('Vaccine Candidates per Phase'));
- expect(
- await screen.findByText(
- 'Click to edit Vaccine Candidates per Phase in a new tab',
- ),
- ).toBeInTheDocument();
-});
-
test('Should not render click to edit prompt and run onExploreChart on click if supersetCanExplore=false', () => {
const props = createProps({ supersetCanExplore: false });
const history = createMemoryHistory({
diff --git a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx
index 0d25a3722d..f56c9c9cd5 100644
--- a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx
+++ b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx
@@ -19,13 +19,7 @@
import cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
-import {
- styled,
- t,
- logging,
- isFeatureEnabled,
- FeatureFlag,
-} from '@superset-ui/core';
+import { styled, t, logging } from '@superset-ui/core';
import { isEqual } from 'lodash';
import { withRouter } from 'react-router-dom';
@@ -319,10 +313,7 @@ class Chart extends React.Component {
[URL_PARAMS.formDataKey.name]: key,
[URL_PARAMS.sliceId.name]: this.props.slice.slice_id,
});
- if (
- isFeatureEnabled(FeatureFlag.DASHBOARD_EDIT_CHART_IN_NEW_TAB) ||
- isOpenInNewTab
- ) {
+ if (isOpenInNewTab) {
window.open(url, '_blank', 'noreferrer');
} else {
this.props.history.push(url);
diff --git a/superset-frontend/src/dashboard/util/getSliceHeaderTooltip.tsx b/superset-frontend/src/dashboard/util/getSliceHeaderTooltip.tsx
index 57def408b6..cb24dd7b18 100644
--- a/superset-frontend/src/dashboard/util/getSliceHeaderTooltip.tsx
+++ b/superset-frontend/src/dashboard/util/getSliceHeaderTooltip.tsx
@@ -18,15 +18,10 @@
*/
import React from 'react';
-import { FeatureFlag, isFeatureEnabled, t } from '@superset-ui/core';
+import { t } from '@superset-ui/core';
import { detectOS } from 'src/utils/common';
export const getSliceHeaderTooltip = (sliceName: string | undefined) => {
- if (isFeatureEnabled(FeatureFlag.DASHBOARD_EDIT_CHART_IN_NEW_TAB)) {
- return sliceName
- ? t('Click to edit %s in a new tab', sliceName)
- : t('Click to edit chart.');
- }
const isMac = detectOS() === 'MacOS';
const firstLine = sliceName
? t('Click to edit %s.', sliceName)
diff --git a/superset/config.py b/superset/config.py
index 7027138186..f3ad488a71 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -388,8 +388,8 @@ LANGUAGES = {}
# will result in combined feature flags of { 'FOO': True, 'BAR': True, 'BAZ': True }
DEFAULT_FEATURE_FLAGS: Dict[str, bool] = {
# Experimental feature introducing a client (browser) cache
- "CLIENT_CACHE": False,
- "DISABLE_DATASET_SOURCE_EDIT": False,
+ "CLIENT_CACHE": False, # deprecated
+ "DISABLE_DATASET_SOURCE_EDIT": False, # deprecated
# When using a recent version of Druid that supports JOINs turn this on
"DRUID_JOINS": False,
"DYNAMIC_PLUGINS": False,
@@ -404,7 +404,7 @@ DEFAULT_FEATURE_FLAGS: Dict[str, bool] = {
# When ENABLE_EXPLORE_JSON_CSRF_PROTECTION is set to true, your users cannot
# make GET request to explore_json. explore_json accepts both GET and POST request.
# See `PR 7935 <https://github.com/apache/superset/pull/7935>`_ for more details.
- "ENABLE_EXPLORE_JSON_CSRF_PROTECTION": False,
+ "ENABLE_EXPLORE_JSON_CSRF_PROTECTION": False, # deprecated
"ENABLE_TEMPLATE_PROCESSING": False,
"ENABLE_TEMPLATE_REMOVE_FILTERS": False,
# Allow for javascript controls components
@@ -419,19 +419,19 @@ DEFAULT_FEATURE_FLAGS: Dict[str, bool] = {
"PRESTO_EXPAND_DATA": False,
# Exposes API endpoint to compute thumbnails
"THUMBNAILS": False,
- "DASHBOARD_CACHE": False,
- "REMOVE_SLICE_LEVEL_LABEL_COLORS": False,
+ "DASHBOARD_CACHE": False, # deprecated
+ "REMOVE_SLICE_LEVEL_LABEL_COLORS": False, # deprecated
"SHARE_QUERIES_VIA_KV_STORE": False,
"TAGGING_SYSTEM": False,
"SQLLAB_BACKEND_PERSISTENCE": True,
"LISTVIEWS_DEFAULT_CARD_VIEW": False,
# When True, this escapes HTML (rather than rendering it) in Markdown components
"ESCAPE_MARKDOWN_HTML": False,
- "DASHBOARD_NATIVE_FILTERS": True,
+ "DASHBOARD_NATIVE_FILTERS": True, # deprecated
"DASHBOARD_CROSS_FILTERS": False,
# Feature is under active development and breaking changes are expected
- "DASHBOARD_NATIVE_FILTERS_SET": False,
- "DASHBOARD_FILTERS_EXPERIMENTAL": False,
+ "DASHBOARD_NATIVE_FILTERS_SET": False, # deprecated
+ "DASHBOARD_FILTERS_EXPERIMENTAL": False, # deprecated
"DASHBOARD_VIRTUALIZATION": False,
"GLOBAL_ASYNC_QUERIES": False,
"VERSIONED_EXPORT": True,
@@ -452,10 +452,9 @@ 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,
- "GENERIC_CHART_AXES": True,
+ "GENERIC_CHART_AXES": True, # deprecated
"ALLOW_ADHOC_SUBQUERY": False,
"USE_ANALAGOUS_COLORS": False,
- "DASHBOARD_EDIT_CHART_IN_NEW_TAB": False,
# Apply RLS rules to SQL Lab queries. This requires parsing and manipulating the
# query, and might break queries and/or allow users to bypass RLS. Use with care!
"RLS_IN_SQLLAB": False,