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

Commitffe22a0

Browse files
authored
chore: show build timeline regardless of agent scripts count (#20470)
1 parenta1161b7 commitffe22a0

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

‎site/src/modules/workspaces/WorkspaceTiming/WorkspaceTimings.stories.tsx‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,3 +277,47 @@ export const InvalidTimeRange: Story = {
277277
],
278278
},
279279
};
280+
281+
// A template with no agent scripts.
282+
exportconstNoAgentScripts:Story={
283+
args:{
284+
provisionerTimings:[
285+
{
286+
...WorkspaceTimingsResponse.provisioner_timings[0],
287+
stage:"init",
288+
started_at:"2025-01-01T00:00:00Z",
289+
ended_at:"2025-01-01T00:01:00Z",
290+
},
291+
{
292+
...WorkspaceTimingsResponse.provisioner_timings[0],
293+
stage:"plan",
294+
started_at:"2025-01-01T00:01:00Z",
295+
ended_at:"0001-01-01T00:00:00Z",
296+
},
297+
{
298+
...WorkspaceTimingsResponse.provisioner_timings[0],
299+
stage:"graph",
300+
started_at:"0001-01-01T00:00:00Z",
301+
ended_at:"2025-01-01T00:03:00Z",
302+
},
303+
{
304+
...WorkspaceTimingsResponse.provisioner_timings[0],
305+
stage:"apply",
306+
started_at:"2025-01-01T00:03:00Z",
307+
ended_at:"2025-01-01T00:04:00Z",
308+
},
309+
],
310+
agentConnectionTimings:[
311+
{
312+
started_at:"2025-01-01T00:05:00Z",
313+
ended_at:"2025-01-01T00:06:00Z",
314+
stage:"connect",
315+
workspace_agent_id:"67e37a9d-ccac-497e-8f48-4093bcc4f3e7",
316+
workspace_agent_name:"main",
317+
},
318+
],
319+
agentScriptTimings:[
320+
// No agent scripts in the template
321+
],
322+
},
323+
};

‎site/src/modules/workspaces/WorkspaceTiming/WorkspaceTimings.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ export const WorkspaceTimings: FC<WorkspaceTimingsProps> = ({
6969
// filled in different moments.
7070
constisLoading=[
7171
provisionerTimings,
72-
agentScriptTimings,
7372
agentConnectionTimings,
73+
// agentScriptTimings might be an empty array if there are no scripts to run.
74+
// Only provisionerTimings and agentConnectionTimings are guaranteed to have
75+
// at least one entry.
7476
].some((t)=>t.length===0);
7577

7678
// Each agent connection timing is a stage in the timeline to make it easier

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp