Skip to content

Commit 08d1adf

Browse files
authored
CORE-56: release provenance and versions (#5132)
1 parent 4b4f40d commit 08d1adf

File tree

4 files changed

+30
-82
lines changed

4 files changed

+30
-82
lines changed

src/libs/feature-previews-config.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,6 @@ export type FeaturePreview = {
4545
};
4646

4747
const featurePreviewsConfig: readonly FeaturePreview[] = [
48-
{
49-
id: 'data-table-versioning',
50-
title: 'Data Table Versioning',
51-
description:
52-
'Enabling this feature will allow you to save uniquely named versions of data tables. These saved versions will appear in the Data tab and can be restored at any time.',
53-
groups: ['preview-data-versioning-and-provenance'],
54-
feedbackUrl: `mailto:[email protected]?subject=${encodeURIComponent(
55-
'Feedback on data table versioning'
56-
)}`,
57-
},
58-
{
59-
id: 'data-table-provenance',
60-
title: 'Data Table Provenance',
61-
description:
62-
'Enabling this feature will allow you to view information about the workflow that generated data table columns and files.',
63-
groups: ['preview-data-versioning-and-provenance'],
64-
feedbackUrl: `mailto:[email protected]?subject=${encodeURIComponent(
65-
'Feedback on data table provenance'
66-
)}`,
67-
},
6848
{
6949
id: JUPYTERLAB_GCP_FEATURE_ID,
7050
title: 'JupyterLab on GCP',

src/workspace-data/Data.js

Lines changed: 18 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import colors from 'src/libs/colors';
2222
import { getConfig } from 'src/libs/config';
2323
import { reportError, reportErrorAndRethrow, withErrorReporting } from 'src/libs/error';
2424
import Events, { extractWorkspaceDetails } from 'src/libs/events';
25-
import { isFeaturePreviewEnabled } from 'src/libs/feature-previews';
2625
import * as Nav from 'src/libs/nav';
2726
import { notify } from 'src/libs/notifications';
2827
import { forwardRefWithName, useCancellation, useOnMount } from 'src/libs/react-utils';
@@ -408,26 +407,25 @@ const DataTableActions = ({
408407
},
409408
'Delete table'
410409
),
411-
isFeaturePreviewEnabled('data-table-versioning') &&
412-
h(Fragment, [
413-
h(MenuDivider),
414-
h(MenuButton, { onClick: () => setSavingVersion(true) }, ['Save version']),
415-
h(
416-
MenuButton,
417-
{
418-
onClick: () => {
419-
onToggleVersionHistory(!isShowingVersionHistory);
420-
if (!isShowingVersionHistory) {
421-
Ajax().Metrics.captureEvent(Events.dataTableVersioningViewVersionHistory, {
422-
...extractWorkspaceDetails(workspace.workspace),
423-
tableName,
424-
});
425-
}
426-
},
410+
h(Fragment, [
411+
h(MenuDivider),
412+
h(MenuButton, { onClick: () => setSavingVersion(true) }, ['Save version']),
413+
h(
414+
MenuButton,
415+
{
416+
onClick: () => {
417+
onToggleVersionHistory(!isShowingVersionHistory);
418+
if (!isShowingVersionHistory) {
419+
Ajax().Metrics.captureEvent(Events.dataTableVersioningViewVersionHistory, {
420+
...extractWorkspaceDetails(workspace.workspace),
421+
tableName,
422+
});
423+
}
427424
},
428-
[`${isShowingVersionHistory ? 'Hide' : 'Show'} version history`]
429-
),
430-
]),
425+
},
426+
[`${isShowingVersionHistory ? 'Hide' : 'Show'} version history`]
427+
),
428+
]),
431429
]),
432430
},
433431
[
@@ -506,29 +504,6 @@ const DataTableActions = ({
506504
]);
507505
};
508506

509-
const DataTableFeaturePreviewFeedbackBanner = () => {
510-
const isDataTableProvenanceEnabled = isFeaturePreviewEnabled('data-table-provenance');
511-
const isDataTableVersioningEnabled = isFeaturePreviewEnabled('data-table-versioning');
512-
513-
const label = _.join(' and ', _.compact([isDataTableVersioningEnabled && 'versioning', isDataTableProvenanceEnabled && 'provenance']));
514-
const feedbackUrl = `mailto:[email protected]?subject=${encodeURIComponent(`Feedback on data table ${label}`)}`;
515-
516-
return (
517-
(isDataTableProvenanceEnabled || isDataTableVersioningEnabled) &&
518-
div(
519-
{
520-
style: {
521-
padding: '1rem',
522-
borderBottom: `1px solid ${colors.accent()}`,
523-
background: '#fff',
524-
textAlign: 'center',
525-
},
526-
},
527-
[h(Link, { ...Utils.newTabLinkProps, href: feedbackUrl }, [`Provide feedback on data table ${label}`])]
528-
)
529-
);
530-
};
531-
532507
const workspaceDataTypes = Utils.enumify(['entities', 'entitiesVersion', 'snapshot', 'referenceData', 'localVariables', 'bucketObjects', 'wds']);
533508

534509
export const WorkspaceData = _.flow(
@@ -1235,8 +1210,6 @@ export const WorkspaceData = _.flow(
12351210
]),
12361211
h(SidebarSeparator, { sidebarWidth, setSidebarWidth }),
12371212
div({ style: styles.tableViewPanel }, [
1238-
_.includes(selectedData?.type, [workspaceDataTypes.entities, workspaceDataTypes.entitiesVersion]) &&
1239-
h(DataTableFeaturePreviewFeedbackBanner),
12401213
Utils.switchCase(
12411214
selectedData?.type,
12421215
[

src/workspace-data/data-table/entity-service/EntitiesContent.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import { EntityServiceDataTableProvider } from 'src/libs/ajax/data-table-provide
2828
import colors from 'src/libs/colors';
2929
import { withErrorReporting } from 'src/libs/error';
3030
import Events, { extractWorkspaceDetails } from 'src/libs/events';
31-
import { isFeaturePreviewEnabled } from 'src/libs/feature-previews';
3231
import * as Nav from 'src/libs/nav';
3332
import { notify } from 'src/libs/notifications';
3433
import { useCancellation, useOnMount, withDisplayName } from 'src/libs/react-utils';
@@ -528,19 +527,17 @@ const EntitiesContent = ({
528527
borderBottom: `1px solid ${colors.grey(0.4)}`,
529528
},
530529
border: false,
531-
extraColumnActions: isFeaturePreviewEnabled('data-table-provenance')
532-
? (columnName) => [
533-
{
534-
label: 'Show Provenance',
535-
onClick: () => {
536-
if (!(loadingColumnProvenance || columnProvenance)) {
537-
loadColumnProvenance();
538-
}
539-
setShowColumnProvenance(columnName);
540-
},
541-
},
542-
]
543-
: undefined,
530+
extraColumnActions: (columnName) => [
531+
{
532+
label: 'Show Provenance',
533+
onClick: () => {
534+
if (!(loadingColumnProvenance || columnProvenance)) {
535+
loadColumnProvenance();
536+
}
537+
setShowColumnProvenance(columnName);
538+
},
539+
},
540+
],
544541
}),
545542
addingEntity &&
546543
h(AddEntityModal, {

src/workspace-data/data-table/uri-viewer/UriViewer.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { Link } from 'src/components/common';
1111
import { parseGsUri } from 'src/components/data/data-utils';
1212
import { Ajax } from 'src/libs/ajax';
1313
import colors from 'src/libs/colors';
14-
import { isFeaturePreviewEnabled } from 'src/libs/feature-previews';
1514
import { useCancellation, useOnMount, withDisplayName } from 'src/libs/react-utils';
1615
import * as Utils from 'src/libs/utils';
1716
import { requesterPaysWrapper, withRequesterPaysHandler } from 'src/workspaces/common/requester-pays/bucket-utils';
@@ -186,8 +185,7 @@ export const UriViewer = _.flow(
186185
[
187186
timeCreated && els.cell([els.label('Created'), els.data(new Date(timeCreated).toLocaleString())]),
188187
updated && els.cell([els.label('Updated'), els.data(new Date(updated).toLocaleString())]),
189-
isFeaturePreviewEnabled('data-table-provenance') &&
190-
els.cell([els.label('Where did this file come from?'), els.data([h(FileProvenance, { workspace, fileUrl: uri })])]),
188+
els.cell([els.label('Where did this file come from?'), els.data([h(FileProvenance, { workspace, fileUrl: uri })])]),
191189
]
192190
)
193191
);

0 commit comments

Comments
 (0)