Skip to content

fix: display build timings when all timings are loaded #15728

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 5 commits into from
Dec 3, 2024
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
Next Next commit
Improve comments
  • Loading branch information
BrunoQuaresma committed Dec 2, 2024
commit 6067e102b664b6219847876939857590ca2f10f9
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,18 @@ export const WorkspaceTimings: FC<WorkspaceTimingsProps> = ({
].sort((a, b) => {
return new Date(a.started_at).getTime() - new Date(b.started_at).getTime();
});

const [isOpen, setIsOpen] = useState(defaultIsOpen);
const isLoading = timings.length === 0;

// All stages
// Each agent connection timing is a stage in the timeline to make it easier
// to users to see the timing for connection and the other scripts.
const agentStageLabels = Array.from(
new Set(
agentConnectionTimings.map((t) => `agent (${t.workspace_agent_name})`),
),
);

const stages = [
...provisioningStages,
...agentStageLabels.flatMap((a) => agentStages(a)),
Expand Down Expand Up @@ -120,7 +123,8 @@ export const WorkspaceTimings: FC<WorkspaceTimingsProps> = ({
: mergeTimeRanges(stageTimings.map(toTimeRange));

// Prevent users from inspecting internal coder resources in
// provisioner timings.
// provisioner timings because they were not useful to the
// user and would add noise.
const visibleResources = stageTimings.filter((t) => {
const isProvisionerTiming = "resource" in t;
return isProvisionerTiming
Expand Down