Skip to content

Commit 0568f12

Browse files
authored
[ws-manager] Don't skip content backup for failed prebuilds (#19996)
* [ws-manager] Don't skip content backup for failed prebuilds * [dashboard] PrebuildDetailPage: Add button "Open Debug Workspace"
1 parent 85bacbc commit 0568f12

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

components/dashboard/src/prebuilds/detail/PrebuildDetailPage.tsx

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,25 @@ export const PrebuildDetailPage: FC = () => {
282282
onClick={() => triggerPrebuild()}
283283
>{`Rerun Prebuild (${prebuild.ref})`}</LoadingButton>
284284
)}
285-
<LinkButton
286-
disabled={!prebuild?.id}
287-
href={repositoriesRoutes.PrebuildsSettings(prebuild.configurationId)}
288-
variant="secondary"
289-
>
290-
View Prebuild Settings
291-
</LinkButton>
285+
<div className="space-x-6 flex justify-right">
286+
<LinkButton
287+
disabled={!prebuild?.id}
288+
href={repositoriesRoutes.PrebuildsSettings(prebuild.configurationId)}
289+
variant="secondary"
290+
>
291+
View Prebuild Settings
292+
</LinkButton>
293+
<LoadingButton
294+
loading={false}
295+
disabled={prebuild?.status?.phase?.name !== PrebuildPhase_Phase.AVAILABLE}
296+
onClick={() =>
297+
(window.location.href = `/#open-prebuild/${prebuild?.id}/${prebuild?.contextUrl}`)
298+
}
299+
variant="default"
300+
>
301+
Open Debug Workspace
302+
</LoadingButton>
303+
</div>
292304
</div>
293305
</div>
294306
)

components/ws-daemon/pkg/controller/workspace_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ func (wsc *WorkspaceController) handleWorkspaceStop(ctx context.Context, ws *wor
302302
SnapshotName: snapshotName,
303303
BackupLogs: ws.Spec.Type == workspacev1.WorkspaceTypePrebuild,
304304
UpdateGitStatus: ws.Spec.Type == workspacev1.WorkspaceTypeRegular,
305-
SkipBackupContent: ws.Spec.Type == workspacev1.WorkspaceTypePrebuild && ws.IsConditionTrue(workspacev1.WorkspaceConditionsHeadlessTaskFailed),
305+
SkipBackupContent: false,
306306
})
307307

308308
err = retry.RetryOnConflict(retryParams, func() error {

0 commit comments

Comments
 (0)