Skip to content

Commit 1aa6f42

Browse files
authored
[AN-507] Remove LifeSciences related code (#5386)
1 parent b18417d commit 1aa6f42

File tree

4 files changed

+3
-45
lines changed

4 files changed

+3
-45
lines changed

src/libs/ajax/workspaces/workspace-models.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export type WorkspaceSetting =
3636
| BucketLifecycleSetting
3737
| SoftDeleteSetting
3838
| RequesterPaysSetting
39-
| BatchSetting
4039
| SeparateSubmissionFinalOutputsSetting
4140
| ImprovedDataTablesSetting
4241
| WorkspaceAnalysisLogRetentionSetting;
@@ -61,11 +60,6 @@ export interface ImprovedDataTablesSetting {
6160
config: { enabled: boolean };
6261
}
6362

64-
export interface BatchSetting {
65-
settingType: 'UseCromwellGcpBatchBackend';
66-
config: { enabled: boolean };
67-
}
68-
6963
export interface WorkspaceAnalysisLogRetentionSetting {
7064
settingType: 'GcpLogBucketRetention';
7165
config: { retentionDurationInDays: number };

src/pages/workspaces/workspace/workflows/LaunchAnalysisModal.js

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { warningBoxStyle } from 'src/libs/style';
1616
import * as Utils from 'src/libs/utils';
1717
import { commentValidation } from 'src/pages/workspaces/workspace/submissionHistory/UpdateUserCommentModal';
1818
import { chooseBaseType, chooseRootType, chooseSetType } from 'src/pages/workspaces/workspace/workflows/EntitySelectionType';
19-
import { isBatchSetting } from 'src/workspaces/SettingsModal/utils';
2019

2120
const LaunchAnalysisModal = ({
2221
onDismiss,
@@ -47,8 +46,6 @@ const LaunchAnalysisModal = ({
4746
const [bucketLocation, setBucketLocation] = useState({});
4847
const [userComment, setUserComment] = useState(undefined);
4948
const [userCommentError, setUserCommentError] = useState(undefined);
50-
// Default backend is Batch if there is no 'UseCromwellGcpBatchBackend' setting found for a workspace.
51-
const [workflowBackend, setWorkflowBackend] = useState('Batch');
5249
const signal = useCancellation();
5350

5451
useOnMount(() => {
@@ -57,18 +54,7 @@ const LaunchAnalysisModal = ({
5754
setBucketLocation({ location, locationType });
5855
});
5956

60-
// This should be removed once LifeSciences support has been completely removed.
61-
// See https://broadworkbench.atlassian.net/browse/AN-507
62-
const workflowBackend = async () => {
63-
const settings = await Workspaces(signal).workspaceV2(namespace, workspaceName).getSettings();
64-
const batchSetting = settings.find((setting) => isBatchSetting(setting));
65-
if (batchSetting?.config.enabled === false) {
66-
setWorkflowBackend('LifeSciences');
67-
}
68-
};
69-
7057
loadBucketLocation();
71-
workflowBackend();
7258
});
7359

7460
const doLaunch = async () => {
@@ -112,7 +98,7 @@ const LaunchAnalysisModal = ({
11298
setMessage({ createSet: 'Creating set...', launch: 'Launching analysis...', checkBucketAccess: 'Checking bucket access...' }[stage]);
11399
},
114100
});
115-
onSuccess(submissionId, workflowBackend);
101+
onSuccess(submissionId);
116102
} catch (error) {
117103
setLaunchError(await (error instanceof Response ? error.json().then((data) => data.message) : error.message));
118104
setMessage(undefined);
@@ -127,7 +113,7 @@ const LaunchAnalysisModal = ({
127113
[type === chooseSetType, () => _.flow(mergeSets, _.uniqBy('entityName'))(selectedEntities).length]
128114
);
129115
const { location, locationType } = bucketLocation;
130-
// us-central1 is always used for the location of the lifesciences api metadata.
116+
// us-central1 is always used for the location of the GCP Batch API metadata.
131117
// This is separate from the location that the VMs will run in, which is what we're setting here with computeRegion.
132118
const { flag, regionDescription } = getRegionInfo(location, locationType);
133119

@@ -224,22 +210,6 @@ const LaunchAnalysisModal = ({
224210
}),
225211
]),
226212
]),
227-
// Remove this as part of https://broadworkbench.atlassian.net/browse/AN-507
228-
workflowBackend === 'LifeSciences' &&
229-
div(
230-
{
231-
style: { ...warningBoxStyle, fontSize: 14, display: 'flex', flexDirection: 'column' },
232-
},
233-
[
234-
div({ style: { display: 'flex', flexDirection: 'row', alignItems: 'center' } }, [
235-
icon('warning-standard', { size: 19, style: { color: colors.warning(), flex: 'none', marginRight: '0.5rem' } }),
236-
'LifeSciences API Shutdown Warning',
237-
]),
238-
div({ style: { fontWeight: 'normal', marginTop: '0.5rem' } }, [
239-
'This workspace is launching workflows with the LifeSciences API, which will be shut down on July 8th, 2025. To switch to its successor Batch API, please contact Terra Support team.',
240-
]),
241-
]
242-
),
243213
warnDuplicateAnalyses &&
244214
div(
245215
{

src/pages/workspaces/workspace/workflows/WorkflowView.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ export const WorkflowView = _.flow(
494494
monitoringImageScript,
495495
perWorkflowCostCap,
496496
onDismiss: () => this.setState({ launching: false }),
497-
onSuccess: (submissionId, workflowBackend) => {
497+
onSuccess: (submissionId) => {
498498
const {
499499
methodRepoMethod: { methodVersion, methodNamespace, methodName, methodPath, sourceRepo },
500500
} = modifiedConfig;
@@ -503,7 +503,6 @@ export const WorkflowView = _.flow(
503503
methodVersion,
504504
sourceRepo,
505505
methodPath: sourceRepo === 'agora' ? `${methodNamespace}/${methodName}` : methodPath,
506-
workflowBackend, // This should be removed in https://broadworkbench.atlassian.net/browse/AN-507
507506
});
508507
if (perWorkflowCostCap !== '') {
509508
void Metrics().captureEvent(Events.workflowSetCostCap, {

src/workspaces/SettingsModal/utils.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import _ from 'lodash/fp';
22
import {
3-
BatchSetting,
43
BucketLifecycleRule,
54
BucketLifecycleSetting,
65
DeleteBucketLifecycleRule,
@@ -18,7 +17,6 @@ export type {
1817
RequesterPaysSetting,
1918
SoftDeleteSetting,
2019
WorkspaceSetting,
21-
BatchSetting,
2220
} from 'src/libs/ajax/workspaces/workspace-models';
2321

2422
export const suggestedPrefixes = {
@@ -46,9 +44,6 @@ export const isRequesterPaysSetting = (setting: WorkspaceSetting): setting is Re
4644
export const isImprovedDataTablesSetting = (setting: WorkspaceSetting): setting is ImprovedDataTablesSetting =>
4745
setting.settingType === 'CompactDataTables';
4846

49-
export const isBatchSetting = (setting: WorkspaceSetting): setting is BatchSetting =>
50-
setting.settingType === 'UseCromwellGcpBatchBackend';
51-
5247
export const isLogRetentionSetting = (setting: WorkspaceSetting): setting is WorkspaceAnalysisLogRetentionSetting =>
5348
setting.settingType === 'GcpLogBucketRetention';
5449

0 commit comments

Comments
 (0)