Skip to content

Commit

Permalink
Dashboard: support for buildkite sharding. (#2014)
Browse files Browse the repository at this point in the history
  • Loading branch information
coeuvre authored Aug 1, 2024
1 parent 53aaade commit 0414dba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dashboard/client/pages/bazelci.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ function JobStats({
}

const data = stats.data.items;
var group = _.groupBy(data, (item) => item.bazelCITask);
var group = _.groupBy(data, (item) => item.name);

return _.map(
_.sortBy(
Expand All @@ -240,7 +240,7 @@ function JobStats({
<>
{_.map(sortedGroup, (data) => (
<div
key={data[0].bazelCITask}
key={data[0].name}
className="flex flex-col border shadow rounded bg-white ring-1 ring-black ring-opacity-5 flex-auto"
>
<div className="bg-gray-100 flex flex-row items-center border-b">
Expand Down
6 changes: 5 additions & 1 deletion dashboard/server/database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ WITH buildkite_job AS (WITH buildkite_job_data AS (SELECT org,
'--task=(\S+)'),
SUBSTRING(data ->> 'command' FROM
'--platform=(\S+)')) AS bazelci_task,
COALESCE(
(data ->> 'parallel_group_index')::integer,
0) AS parallel_group_index,
data ->> 'state' AS state,
(data ->> 'scheduled_at')::timestamptz AS scheduled_at,
(data ->> 'created_at')::timestamptz AS created_at,
Expand All @@ -353,7 +356,8 @@ FROM buildkite_job
WHERE bazelci_task is NOT NULL;

CREATE UNIQUE INDEX buildkite_job_mview_pkey
ON buildkite_job_mview (org, pipeline, build_number, bazelci_task);
ON buildkite_job_mview (org, pipeline, build_number, bazelci_task,
parallel_group_index);
CREATE INDEX buildkite_job_mview_created_at
on buildkite_job_mview (created_at);
CREATE INDEX buildkite_job_mview_state
Expand Down

0 comments on commit 0414dba

Please sign in to comment.