Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Removes the deprecated VERSIONED_EXPORT feature flag #26347

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion RESOURCES/FEATURE_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,3 @@ These features flags currently default to True and **will be removed in a future
- ENABLE_TEMPLATE_REMOVE_FILTERS
- GENERIC_CHART_AXES
- REMOVE_SLICE_LEVEL_LABEL_COLORS
- VERSIONED_EXPORT
2 changes: 2 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ assists people when migrating to a new version.

### Breaking Changes

- [26347](https://github.com/apache/superset/issues/26347): Removes the deprecated `VERSIONED_EXPORT` feature flag. The previous value of the feature flag was `True` and now the feature is permanently enabled.

### Potential Downtime

### Other
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export enum FeatureFlag {
THUMBNAILS = 'THUMBNAILS',
USE_ANALAGOUS_COLORS = 'USE_ANALAGOUS_COLORS',
TAGGING_SYSTEM = 'TAGGING_SYSTEM',
VERSIONED_EXPORT = 'VERSIONED_EXPORT',
SSH_TUNNELING = 'SSH_TUNNELING',
AVOID_COLORS_COLLISION = 'AVOID_COLORS_COLLISION',
}
Expand Down
3 changes: 1 addition & 2 deletions superset-frontend/src/features/charts/ChartCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ export default function ChartCard({
const history = useHistory();
const canEdit = hasPerm('can_write');
const canDelete = hasPerm('can_write');
const canExport =
hasPerm('can_export') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
const canExport = hasPerm('can_export');
const theme = useTheme();

const menu = (
Expand Down
31 changes: 14 additions & 17 deletions superset-frontend/src/pages/ChartList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ function ChartList(props: ChartListProps) {
const canCreate = hasPerm('can_write');
const canEdit = hasPerm('can_write');
const canDelete = hasPerm('can_write');
const canExport =
hasPerm('can_export') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
const canExport = hasPerm('can_export');
const initialSort = [{ id: 'changed_on_delta_humanized', desc: true }];
const handleBulkChartExport = (chartsToExport: Chart[]) => {
const ids = chartsToExport.map(({ id }) => id);
Expand Down Expand Up @@ -781,21 +780,19 @@ function ChartList(props: ChartListProps) {
},
});

if (isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT)) {
subMenuButtons.push({
name: (
<Tooltip
id="import-tooltip"
title={t('Import charts')}
placement="bottomRight"
>
<Icons.Import data-test="import-button" />
</Tooltip>
),
buttonStyle: 'link',
onClick: openChartImportModal,
});
}
subMenuButtons.push({
name: (
<Tooltip
id="import-tooltip"
title={t('Import charts')}
placement="bottomRight"
>
<Icons.Import data-test="import-button" />
</Tooltip>
),
buttonStyle: 'link',
onClick: openChartImportModal,
});
}

return (
Expand Down
31 changes: 14 additions & 17 deletions superset-frontend/src/pages/DashboardList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ function DashboardList(props: DashboardListProps) {
const canCreate = hasPerm('can_write');
const canEdit = hasPerm('can_write');
const canDelete = hasPerm('can_write');
const canExport =
hasPerm('can_export') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
const canExport = hasPerm('can_export');

const initialSort = [{ id: 'changed_on_delta_humanized', desc: true }];

Expand Down Expand Up @@ -659,21 +658,19 @@ function DashboardList(props: DashboardListProps) {
},
});

if (isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT)) {
subMenuButtons.push({
name: (
<Tooltip
id="import-tooltip"
title={t('Import dashboards')}
placement="bottomRight"
>
<Icons.Import data-test="import-button" />
</Tooltip>
),
buttonStyle: 'link',
onClick: openDashboardImportModal,
});
}
subMenuButtons.push({
name: (
<Tooltip
id="import-tooltip"
title={t('Import dashboards')}
placement="bottomRight"
>
<Icons.Import data-test="import-button" />
</Tooltip>
),
buttonStyle: 'link',
onClick: openDashboardImportModal,
});
}
return (
<>
Expand Down
5 changes: 1 addition & 4 deletions superset-frontend/src/pages/DatabaseList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* under the License.
*/
import {
isFeatureEnabled,
FeatureFlag,
getExtensionsRegistry,
styled,
SupersetClient,
Expand Down Expand Up @@ -216,8 +214,7 @@ function DatabaseList({
const canCreate = hasPerm('can_write');
const canEdit = hasPerm('can_write');
const canDelete = hasPerm('can_write');
const canExport =
hasPerm('can_export') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
const canExport = hasPerm('can_export');

const { canUploadCSV, canUploadColumnar, canUploadExcel } = uploadUserPerms(
roles,
Expand Down
33 changes: 14 additions & 19 deletions superset-frontend/src/pages/DatasetList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* under the License.
*/
import {
isFeatureEnabled,
FeatureFlag,
getExtensionsRegistry,
styled,
SupersetClient,
Expand Down Expand Up @@ -207,8 +205,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
const canDelete = hasPerm('can_write');
const canCreate = hasPerm('can_write');
const canDuplicate = hasPerm('can_duplicate');
const canExport =
hasPerm('can_export') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
const canExport = hasPerm('can_export');

const initialSort = SORT_BY;

Expand Down Expand Up @@ -656,21 +653,19 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
buttonStyle: 'primary',
});

if (isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT)) {
buttonArr.push({
name: (
<Tooltip
id="import-tooltip"
title={t('Import datasets')}
placement="bottomRight"
>
<Icons.Import data-test="import-button" />
</Tooltip>
),
buttonStyle: 'link',
onClick: openDatasetImportModal,
});
}
buttonArr.push({
name: (
<Tooltip
id="import-tooltip"
title={t('Import datasets')}
placement="bottomRight"
>
<Icons.Import data-test="import-button" />
</Tooltip>
),
buttonStyle: 'link',
onClick: openDatasetImportModal,
});
}

menuData.buttons = buttonArr;
Expand Down
5 changes: 2 additions & 3 deletions superset-frontend/src/pages/SavedQueryList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ function SavedQueryList({
const canCreate = hasPerm('can_write');
const canEdit = hasPerm('can_write');
const canDelete = hasPerm('can_write');
const canExport =
hasPerm('can_export') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
const canExport = hasPerm('can_export');

const handleSavedQueryPreview = useCallback(
(id: number) => {
Expand Down Expand Up @@ -204,7 +203,7 @@ function SavedQueryList({
buttonStyle: 'primary',
});

if (canCreate && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT)) {
if (canCreate) {
subMenuButtons.push({
name: (
<Tooltip
Expand Down
Loading
Loading