Skip to content

fix: display explicit 'retry' button(s) when a workspace fails #10720

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

Merged
merged 16 commits into from
Nov 22, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: make handleBuildRetry auto-detect debug permissions
  • Loading branch information
Parkreiner committed Nov 15, 2023
commit 6005ceca30ea9853c72fa51a4a144d72a29be0f9
12 changes: 9 additions & 3 deletions site/src/pages/WorkspacePage/WorkspaceReadyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,16 @@ export const WorkspaceReadyPage = ({
handleCancel={cancelBuildMutation.mutate}
handleSettings={() => navigate("settings")}
handleBuildRetry={() => {
const logLevel = canRetryDebugMode ? "debug" : undefined;
switch (workspace.latest_build.transition) {
case "start":
startWorkspaceMutation.mutate({ logLevel: "debug" });
startWorkspaceMutation.mutate({ logLevel });
break;
case "stop":
stopWorkspaceMutation.mutate({ logLevel: "debug" });
stopWorkspaceMutation.mutate({ logLevel });
break;
case "delete":
deleteWorkspaceMutation.mutate({ logLevel: "debug" });
deleteWorkspaceMutation.mutate({ logLevel });
break;
}
}}
Expand Down Expand Up @@ -297,6 +298,7 @@ export const WorkspaceReadyPage = ({
}
canAutostart={canAutostart}
/>

<WorkspaceDeleteDialog
workspace={workspace}
canUpdateTemplate={canDeleteWorkspace}
Expand All @@ -310,6 +312,7 @@ export const WorkspaceReadyPage = ({
}}
workspaceBuildDateStr={dayjs(workspace.created_at).fromNow()}
/>

<UpdateBuildParametersDialog
missedParameters={
changeVersionMutation.error instanceof MissingBuildParameters
Expand All @@ -329,6 +332,7 @@ export const WorkspaceReadyPage = ({
}
}}
/>

<UpdateBuildParametersDialog
missedParameters={
updateWorkspaceMutation.error instanceof MissingBuildParameters
Expand All @@ -345,6 +349,7 @@ export const WorkspaceReadyPage = ({
}
}}
/>

<ChangeVersionDialog
templateVersions={allVersions?.reverse()}
template={template}
Expand All @@ -360,6 +365,7 @@ export const WorkspaceReadyPage = ({
changeVersionMutation.mutate({ versionId: templateVersion.id });
}}
/>

<WarningDialog
open={isConfirmingUpdate}
onConfirm={() => {
Expand Down