Skip to content

Commit

Permalink
fix: remove unsupported start method for Che7 workspaces
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Orel <[email protected]>
  • Loading branch information
olexii4 committed Jun 22, 2022
1 parent f6562c6 commit 08db3bc
Showing 1 changed file with 4 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,32 +275,11 @@ export const actionCreators: ActionCreators = {

startWorkspace:
(
workspace: che.Workspace,
params?: ResourceQueryParams,
_workspace: che.Workspace,
_params?: ResourceQueryParams,
): AppThunk<KnownAction, Promise<void>> =>
async (dispatch): Promise<void> => {
try {
const update = await cheWorkspaceClient.restApiClient.start<che.Workspace>(
workspace.id,
params,
);
dispatch({ type: 'CHE_DELETE_WORKSPACE_LOGS', workspaceId: update.id });
subscribeToEnvironmentOutput(workspace.id, dispatch);

dispatch({
type: 'CHE_UPDATE_WORKSPACE',
workspace: update,
});
} catch (e) {
const errorMessage =
`Failed to start the workspace ${workspace.devfile.metadata.name}, reason: ` +
common.helpers.errors.getMessage(e);
dispatch({
type: 'CHE_RECEIVE_ERROR',
error: errorMessage,
});
throw errorMessage;
}
async (): Promise<void> => {
throw new Error('Running Che7 workspaces is not supported.');
},

stopWorkspace:
Expand Down

0 comments on commit 08db3bc

Please sign in to comment.