Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb5ba3e3

Browse files
authored
fix(site): only show provisioner warnings for pending workspaces (#15858)
When creating, starting, stopping or otherwise mutating a workspace, weused to erroneously and briefly display a provisioner health warningalert. This PR updates the component to only display this warning if thebuild is pending, not "starting" or any other state that means aprovisioner has already acquired the job.
1 parentd35de45 commitb5ba3e3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎site/src/pages/WorkspacePage/Workspace.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,13 @@ export const Workspace: FC<WorkspaceProps> = ({
111111
);
112112

113113
constworkspaceRunning=workspace.latest_build.status==="running";
114+
constworkspacePending=workspace.latest_build.status==="pending";
114115
consthaveBuildLogs=(buildLogs??[]).length>0;
116+
constshouldShowBuildLogs=haveBuildLogs&&!workspaceRunning;
115117
constprovisionersHealthy=
116-
(workspace.latest_build.matched_provisioners?.available??0)>0;
117-
constshouldDisplayBuildLogs=haveBuildLogs&&!workspaceRunning;
118+
(workspace.latest_build.matched_provisioners?.available??1)>0;
118119
constshouldShowProvisionerAlert=
119-
!workspaceRunning&&!haveBuildLogs&&!provisionersHealthy;
120+
workspacePending&&!haveBuildLogs&&!provisionersHealthy&&!isRestarting;
120121

121122
return(
122123
<div
@@ -244,7 +245,7 @@ export const Workspace: FC<WorkspaceProps> = ({
244245
/>
245246
)}
246247

247-
{shouldDisplayBuildLogs&&(
248+
{shouldShowBuildLogs&&(
248249
<WorkspaceBuildLogsSectionlogs={buildLogs}/>
249250
)}
250251

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp