Skip to content

Commit f9ce7c7

Browse files
committed
Remove LIMIT from built-in dashboard queries
1 parent bfe417f commit f9ce7c7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

apps/webapp/app/presenters/v3/BuiltInDashboards.server.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ const overviewDashboard: BuiltInDashboard = {
2929
widgets: {
3030
"9lDDdebQ": {
3131
title: "Total runs",
32-
query: "SELECT\r\n count() AS total_runs\r\nFROM\r\n runs\r\nLIMIT\r\n 100",
32+
query: "SELECT\r\n count() AS total_runs\r\nFROM\r\n runs",
3333
display: { type: "bignumber", column: "total_runs", aggregation: "sum", abbreviate: false },
3434
},
3535
VhAgNlB0: {
3636
title: "Success %",
3737
query:
38-
"SELECT\r\n round(countIf (status = 'Completed') * 100.0 / countIf (is_finished = 1), 2) AS success_percentage\r\nFROM\r\n runs\r\nLIMIT\r\n 100",
38+
"SELECT\r\n round(countIf (status = 'Completed') * 100.0 / countIf (is_finished = 1), 2) AS success_percentage\r\nFROM\r\n runs",
3939
display: {
4040
type: "bignumber",
4141
column: "success_percentage",
@@ -47,14 +47,14 @@ const overviewDashboard: BuiltInDashboard = {
4747
iI5EnhJW: {
4848
title: "Failed runs",
4949
query:
50-
"SELECT\r\n count() AS total_runs\r\nFROM\r\n runs\r\nWHERE status IN ('Failed', 'System failure', 'Crashed')\r\nLIMIT\r\n 100",
50+
"SELECT\r\n count() AS total_runs\r\nFROM\r\n runs\r\nWHERE status IN ('Failed', 'System failure', 'Crashed')",
5151
display: { type: "bignumber", column: "total_runs", aggregation: "sum", abbreviate: false },
5252
},
5353
HtSgJEmp: { title: "Failed runs", query: "", display: { type: "title" } },
5454
"rRbzv-Aq": {
5555
title: "Runs by status",
5656
query:
57-
"SELECT\r\n timeBucket (),\r\n status,\r\n count() AS run_count\r\nFROM\r\n runs\r\nGROUP BY\r\n timeBucket,\r\n status\r\nORDER BY\r\n timeBucket\r\nLIMIT\r\n 100",
57+
"SELECT\r\n timeBucket (),\r\n status,\r\n count() AS run_count\r\nFROM\r\n runs\r\nGROUP BY\r\n timeBucket,\r\n status\r\nORDER BY\r\n timeBucket",
5858
display: {
5959
type: "chart",
6060
chartType: "bar",
@@ -70,20 +70,20 @@ const overviewDashboard: BuiltInDashboard = {
7070
j3yFSxLM: {
7171
title: "Top failing tasks",
7272
query:
73-
"SELECT\r\n task_identifier AS task,\r\n count() AS runs,\r\n countIf (status IN ('Failed', 'Crashed', 'System failure')) AS failures,\r\n concat(round((countIf (status IN ('Failed', 'Crashed', 'System failure')) / count()) * 100, 2), '%') AS failure_rate,\r\n avg(attempt_count - 1) AS avg_retries\r\nFROM\r\n runs\r\nGROUP BY\r\n task_identifier\r\nORDER BY\r\n (countIf (status IN ('Failed', 'Crashed', 'System failure')) / count()) DESC\r\nLIMIT\r\n 100;",
73+
"SELECT\r\n task_identifier AS task,\r\n count() AS runs,\r\n countIf (status IN ('Failed', 'Crashed', 'System failure')) AS failures,\r\n concat(round((countIf (status IN ('Failed', 'Crashed', 'System failure')) / count()) * 100, 2), '%') AS failure_rate,\r\n avg(attempt_count - 1) AS avg_retries\r\nFROM\r\n runs\r\nGROUP BY\r\n task_identifier\r\nORDER BY\r\n (countIf (status IN ('Failed', 'Crashed', 'System failure')) / count()) DESC;",
7474
display: { type: "table", prettyFormatting: true, sorting: [] },
7575
},
7676
IKB8cENo: {
7777
title: "Top failing tags",
7878
query:
79-
"SELECT\r\n arrayJoin(tags) AS tag,\r\n count() AS runs,\r\n countIf (status IN ('Failed', 'Crashed', 'System failure')) AS failures,\r\n concat(round((countIf (status IN ('Failed', 'Crashed', 'System failure')) / count()) * 100, 2), '%') AS failure_rate,\r\n avg(attempt_count - 1) AS avg_retries\r\nFROM\r\n runs\r\nGROUP BY\r\n tag\r\nORDER BY\r\n (countIf (status IN ('Failed', 'Crashed', 'System failure')) / count()) DESC\r\nLIMIT\r\n 100;",
79+
"SELECT\r\n arrayJoin(tags) AS tag,\r\n count() AS runs,\r\n countIf (status IN ('Failed', 'Crashed', 'System failure')) AS failures,\r\n concat(round((countIf (status IN ('Failed', 'Crashed', 'System failure')) / count()) * 100, 2), '%') AS failure_rate,\r\n avg(attempt_count - 1) AS avg_retries\r\nFROM\r\n runs\r\nGROUP BY\r\n tag\r\nORDER BY\r\n (countIf (status IN ('Failed', 'Crashed', 'System failure')) / count()) DESC;",
8080
display: { type: "table", prettyFormatting: true, sorting: [] },
8181
},
8282
"-fHz3CyQ": { title: "Usage and cost", query: "", display: { type: "title" } },
8383
hnKsN482: {
8484
title: "Cost by task",
8585
query:
86-
"SELECT\r\n timeBucket() as time_period,\r\n task_identifier,\r\n sum(total_cost) AS total_cost\r\nFROM\r\n runs\r\nGROUP BY\r\n time_period,\r\n task_identifier\r\nORDER BY\r\n time_period\r\nLIMIT\r\n 100",
86+
"SELECT\r\n timeBucket() as time_period,\r\n task_identifier,\r\n sum(total_cost) AS total_cost\r\nFROM\r\n runs\r\nGROUP BY\r\n time_period,\r\n task_identifier\r\nORDER BY\r\n time_period",
8787
display: {
8888
type: "chart",
8989
chartType: "line",
@@ -99,7 +99,7 @@ const overviewDashboard: BuiltInDashboard = {
9999
if6dds8T: {
100100
title: "Failed runs by task",
101101
query:
102-
"SELECT\r\n timeBucket () as time_period,\r\n task_identifier,\r\n count() AS run_count\r\nFROM\r\n runs\r\nWHERE status IN ('Failed', 'Crashed', 'System failure')\r\nGROUP BY\r\n time_period,\r\n task_identifier\r\nORDER BY\r\n time_period\r\nLIMIT\r\n 100",
102+
"SELECT\r\n timeBucket () as time_period,\r\n task_identifier,\r\n count() AS run_count\r\nFROM\r\n runs\r\nWHERE status IN ('Failed', 'Crashed', 'System failure')\r\nGROUP BY\r\n time_period,\r\n task_identifier\r\nORDER BY\r\n time_period",
103103
display: {
104104
type: "chart",
105105
chartType: "bar",
@@ -132,13 +132,13 @@ const overviewDashboard: BuiltInDashboard = {
132132
Kh0w0fjy: {
133133
title: "Top errors",
134134
query:
135-
"SELECT\r\n concat(error.name, '(\"', error.message, '\")') AS error,\r\n count() AS count\r\nFROM\r\n runs\r\nWHERE\r\n runs.error != NULL\r\n AND runs.error.name != NULL\r\nGROUP BY\r\n error\r\nORDER BY\r\n count DESC\r\nLIMIT\r\n 100",
135+
"SELECT\r\n concat(error.name, '(\"', error.message, '\")') AS error,\r\n count() AS count\r\nFROM\r\n runs\r\nWHERE\r\n runs.error != NULL\r\n AND runs.error.name != NULL\r\nGROUP BY\r\n error\r\nORDER BY\r\n count DESC",
136136
display: { type: "table", prettyFormatting: true, sorting: [] },
137137
},
138138
zybRTAdz: {
139139
title: "Top errors over time",
140140
query:
141-
"SELECT\r\n timeBucket(),\r\n concat(error.name, '(\"', error.message, '\")') AS error,\r\n count() AS count\r\nFROM\r\n runs\r\nWHERE\r\n runs.error != NULL\r\n AND runs.error.name != NULL\r\nGROUP BY\r\n timeBucket,\r\n error\r\nORDER BY\r\n count DESC\r\nLIMIT\r\n 100",
141+
"SELECT\r\n timeBucket(),\r\n concat(error.name, '(\"', error.message, '\")') AS error,\r\n count() AS count\r\nFROM\r\n runs\r\nWHERE\r\n runs.error != NULL\r\n AND runs.error.name != NULL\r\nGROUP BY\r\n timeBucket,\r\n error\r\nORDER BY\r\n count DESC",
142142
display: {
143143
type: "chart",
144144
chartType: "bar",
@@ -155,7 +155,7 @@ const overviewDashboard: BuiltInDashboard = {
155155
ff2nVxxt: {
156156
title: "Cost by machine",
157157
query:
158-
"SELECT\r\n timeBucket() as time_period,\r\n machine,\r\n sum(total_cost) AS total_cost\r\nFROM\r\n runs\r\nWHERE machine != ''\r\nGROUP BY\r\n time_period,\r\n machine\r\nORDER BY\r\n time_period\r\nLIMIT\r\n 100",
158+
"SELECT\r\n timeBucket() as time_period,\r\n machine,\r\n sum(total_cost) AS total_cost\r\nFROM\r\n runs\r\nWHERE machine != ''\r\nGROUP BY\r\n time_period,\r\n machine\r\nORDER BY\r\n time_period",
159159
display: {
160160
type: "chart",
161161
chartType: "line",
@@ -206,7 +206,7 @@ const overviewDashboard: BuiltInDashboard = {
206206
xyQl3FAd: {
207207
title: "Queued",
208208
query:
209-
"SELECT\r\n count() AS queued\r\nFROM\r\n runs\r\nWHERE status IN ('Dequeued', 'Queued')\r\nLIMIT\r\n 100",
209+
"SELECT\r\n count() AS queued\r\nFROM\r\n runs\r\nWHERE status IN ('Dequeued', 'Queued')",
210210
display: { type: "bignumber", column: "queued", aggregation: "sum", abbreviate: false },
211211
},
212212
},

0 commit comments

Comments
 (0)