Skip to content

Commit

Permalink
GUI Configure cluster dialog: set CP_CAP_SGE parameter only for GridE…
Browse files Browse the repository at this point in the history
…ngine auto-scaled clusters
  • Loading branch information
rodichenko committed Aug 4, 2023
1 parent ba8daa1 commit 0b752cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1161,10 +1161,6 @@ class LaunchPipelineForm extends localization.LocalizedReactComponent {
}
}
if (this.state.launchCluster && this.state.autoScaledCluster) {
payload[PARAMETERS][CP_CAP_SGE] = {
type: 'boolean',
value: true
};
payload[PARAMETERS][CP_CAP_AUTOSCALE] = {
type: 'boolean',
value: true
Expand Down Expand Up @@ -1379,10 +1375,6 @@ class LaunchPipelineForm extends localization.LocalizedReactComponent {
}
}
if (this.state.launchCluster && this.state.autoScaledCluster) {
payload.params[CP_CAP_SGE] = {
type: 'boolean',
value: true
};
payload.params[CP_CAP_AUTOSCALE] = {
type: 'boolean',
value: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ const PARAMETER_TITLE_STYLE = {
marginRight: PARAMETER_TITLE_RIGHT_MARGIN
};

export function autoScaledClusterEnabled (parameters) {
return booleanParameterIsSetToValue(parameters, CP_CAP_SGE) &&
booleanParameterIsSetToValue(parameters, CP_CAP_AUTOSCALE);
}

export function hybridAutoScaledClusterEnabled (parameters) {
return autoScaledClusterEnabled(parameters) &&
booleanParameterIsSetToValue(parameters, CP_CAP_AUTOSCALE_HYBRID);
Expand All @@ -86,6 +81,13 @@ export function slurmEnabled (parameters) {
return booleanParameterIsSetToValue(parameters, CP_CAP_SLURM);
}

export function autoScaledClusterEnabled (parameters) {
return booleanParameterIsSetToValue(parameters, CP_CAP_AUTOSCALE) && (
gridEngineEnabled(parameters) ||
slurmEnabled(parameters)
);
}

export function kubeEnabled (parameters) {
return booleanParameterIsSetToValue(parameters, CP_CAP_KUBE);
}
Expand Down

0 comments on commit 0b752cd

Please sign in to comment.