fix: filter sub-agents from build duration metric (#22732)

This commit is contained in:
Jon Ayers
2026-03-10 12:17:32 -05:00
committed by GitHub
parent b44a421412
commit 22a87f6cf6
4 changed files with 178 additions and 2 deletions
+1 -1
View File
@@ -268,7 +268,7 @@ JOIN workspaces w ON wb.workspace_id = w.id
JOIN templates t ON w.template_id = t.id
JOIN organizations o ON t.organization_id = o.id
JOIN workspace_resources wr ON wr.job_id = wb.job_id
JOIN workspace_agents wa ON wa.resource_id = wr.id
JOIN workspace_agents wa ON wa.resource_id = wr.id AND wa.parent_id IS NULL
WHERE wb.job_id = (SELECT job_id FROM workspace_resources WHERE workspace_resources.id = $1)
GROUP BY wb.created_at, wb.transition, t.name, o.name, w.owner_id;