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

Add the ability to select cluster #872

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function useRelaunchWorkflowFormState({ execution }: RelaunchExecutionFormProps)
securityContext,
interruptible,
overwriteCache,
clusterAssignment
},
} = execution;

Expand All @@ -63,6 +64,7 @@ function useRelaunchWorkflowFormState({ execution }: RelaunchExecutionFormProps)
securityContext,
interruptible,
overwriteCache,
clusterAssignment
};
},
},
Expand All @@ -78,7 +80,7 @@ function useRelaunchTaskFormState({ execution }: RelaunchExecutionFormProps) {
defaultValue: {} as TaskInitialLaunchParameters,
doFetch: async (execution) => {
const {
spec: { authRole, launchPlan: taskId, interruptible, overwriteCache },
spec: { authRole, launchPlan: taskId, interruptible, overwriteCache, clusterAssignment },
} = execution;
const task = await apiContext.getTask(taskId);
const inputDefinitions = getTaskInputs(task);
Expand All @@ -89,7 +91,7 @@ function useRelaunchTaskFormState({ execution }: RelaunchExecutionFormProps) {
},
apiContext,
);
return { authRole, values, taskId, interruptible, overwriteCache };
return { authRole, values, taskId, interruptible, overwriteCache, clusterAssignment };
},
},
execution,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export interface WorkflowInitialLaunchParameters extends BaseInitialLaunchParame
annotations?: Admin.IAnnotations | null;
interruptible?: Protobuf.IBoolValue | null;
overwriteCache?: boolean | null;
clusterAssignment?: Admin.IClusterAssignment | null;
}

export interface LaunchWorkflowFormProps extends BaseLaunchFormProps {
Expand All @@ -82,6 +83,7 @@ export interface TaskInitialLaunchParameters extends BaseInitialLaunchParameters
securityContext?: Core.ISecurityContext;
interruptible?: Protobuf.IBoolValue | null;
overwriteCache?: boolean | null;
clusterAssignment?: Admin.IClusterAssignment | null;
}
export interface LaunchTaskFormProps extends BaseLaunchFormProps {
taskId: NamedEntityIdentifier;
Expand Down
1 change: 1 addition & 0 deletions packages/oss-console/src/models/Execution/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export interface ExecutionSpec extends Admin.IExecutionSpec {
launchPlan: Identifier;
metadata: ExecutionMetadata;
notifications: RequiredNonNullable<Admin.INotificationList>;
clusterAssignment: Admin.IClusterAssignment;
}

export interface Execution extends Admin.IExecution {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export const createMockExecutionSpec: () => ExecutionSpec = () => ({
launchPlan: { ...MOCK_LAUNCH_PLAN_ID },
notifications: { notifications: [] },
metadata: generateExecutionMetadata(),
clusterAssignment: { clusterPoolName: 'cluster1' },
});

export const createMockExecution: (id?: string | number) => Execution = (id = 1) => {
Expand Down