|
964 | 964 | }, |
965 | 965 | "pluginVersion": "4.17.0", |
966 | 966 | "queryType": "timeseries", |
967 | | - "rawSql": "SELECT\n toStartOfInterval(created_at, INTERVAL 5 MINUTE) AS time,\n uniqExact(id) AS jobs\nFROM default.workflow_job\nWHERE match(repository_full_name, '^(${repository:regex})$')\n AND arrayExists(label -> match(label, '^(mt|lf)-(rel-)?l-'), labels)\n AND (\n (runner_group_name IN ('default', 'release-runners') AND match('pytorch-arc-cbr-production', '^(${cluster:regex})$'))\n OR (runner_group_name = 'meta-prod-aws-uw1' AND match('meta-prod-aws-uw1', '^(${cluster:regex})$'))\n OR (runner_group_name = 'meta-prod-aws-ue1' AND match('meta-prod-aws-ue1', '^(${cluster:regex})$'))\n OR (runner_group_name = 'lf-prod-aws-ue1' AND match('lf-prod-aws-ue1', '^(${cluster:regex})$'))\n OR (runner_group_name = 'lf-prod-aws-ue2' AND match('lf-prod-aws-ue2', '^(${cluster:regex})$'))\n )\n AND $__timeFilter(created_at)\nGROUP BY time\nORDER BY time ASC" |
| 967 | + "rawSql": "SELECT\n toStartOfInterval(created_at, INTERVAL 5 MINUTE) AS time,\n uniqExact(id) AS jobs\nFROM default.workflow_job\nWHERE match(repository_full_name, '^(${repository:regex})$')\n AND arrayExists(label -> match(label, '^(mt|lf)-(rel-)?l-'), labels)\n AND (\n (runner_group_name = 'meta-prod-aws-ue2' AND match('meta-prod-aws-ue2', '^(${cluster:regex})$'))\n OR (runner_group_name = 'meta-prod-aws-uw1' AND match('meta-prod-aws-uw1', '^(${cluster:regex})$'))\n OR (runner_group_name = 'meta-prod-aws-ue1' AND match('meta-prod-aws-ue1', '^(${cluster:regex})$'))\n OR (runner_group_name = 'lf-prod-aws-ue1' AND match('lf-prod-aws-ue1', '^(${cluster:regex})$'))\n OR (runner_group_name = 'lf-prod-aws-ue2' AND match('lf-prod-aws-ue2', '^(${cluster:regex})$'))\n )\n AND $__timeFilter(created_at)\nGROUP BY time\nORDER BY time ASC" |
968 | 968 | }, |
969 | 969 | "version": "v0" |
970 | 970 | }, |
|
1215 | 1215 | }, |
1216 | 1216 | "pluginVersion": "4.17.0", |
1217 | 1217 | "queryType": "timeseries", |
1218 | | - "rawSql": "SELECT\n bucket_time AS time,\n dateDiff('second', j_created_at, bucket_time) / 60.0 AS queue_minutes\nFROM (\n SELECT\n argMax(created_at, started_at) AS j_created_at,\n argMax(status, started_at) AS j_status,\n argMax(runner_group_name, started_at) AS j_runner_group_name,\n argMax(labels, started_at) AS j_labels,\n max(_inserted_at) AS j_last_insert,\n if(argMax(status, started_at) IN ('queued', 'waiting'), now64(9), argMax(started_at, started_at)) AS j_queue_end\n FROM default.workflow_job\n PREWHERE created_at <= $__toTime\n AND created_at >= $__fromTime - INTERVAL 24 HOUR\n WHERE arrayExists(x -> startsWith(x, 'mt-l-') OR startsWith(x, 'mt-rel-l-') OR startsWith(x, 'lf-l-') OR startsWith(x, 'lf-rel-l-'), labels)\n AND match(repository_full_name, '^(${repository:regex})$')\n GROUP BY id\n HAVING NOT arrayExists(x -> position(x, 'h100') > 0 OR position(x, 'b200') > 0 OR position(x, 'gb200') > 0 OR position(x, 'a100') > 0, j_labels)\n AND arrayExists(x -> match(x, '^(${runner_name_prefix:regex})$'), j_labels)\n AND (\n (j_runner_group_name IN ('default', 'release-runners') AND match('pytorch-arc-cbr-production', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'meta-prod-aws-uw1' AND match('meta-prod-aws-uw1', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'meta-prod-aws-ue1' AND match('meta-prod-aws-ue1', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'lf-prod-aws-ue1' AND match('lf-prod-aws-ue1', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'lf-prod-aws-ue2' AND match('lf-prod-aws-ue2', '^(${cluster:regex})$'))\n OR (j_runner_group_name = '' AND j_status IN ('queued', 'waiting') AND j_last_insert > now() - INTERVAL 3 HOUR)\n )\n AND j_queue_end >= $__fromTime\n) ARRAY JOIN\n arrayDistinct(arrayConcat(\n arrayFilter(\n t -> t >= j_created_at AND t >= $__fromTime AND t <= $__toTime,\n arrayMap(x -> toDateTime64(x, 9),\n range(\n toUInt32(intDiv(toUInt32(greatest(j_created_at, $__fromTime)), 300) * 300),\n toUInt32(intDiv(toUInt32(least(j_queue_end, $__toTime)), 300) * 300) + 300,\n 300\n )\n )\n ),\n if(j_queue_end >= $__fromTime AND j_queue_end <= $__toTime, [j_queue_end], [])\n )) AS bucket_time\nWHERE bucket_time <= j_queue_end\nORDER BY bucket_time" |
| 1218 | + "rawSql": "SELECT\n bucket_time AS time,\n dateDiff('second', j_created_at, bucket_time) / 60.0 AS queue_minutes\nFROM (\n SELECT\n argMax(created_at, started_at) AS j_created_at,\n argMax(status, started_at) AS j_status,\n argMax(runner_group_name, started_at) AS j_runner_group_name,\n argMax(labels, started_at) AS j_labels,\n max(_inserted_at) AS j_last_insert,\n if(argMax(status, started_at) IN ('queued', 'waiting'), now64(9), argMax(started_at, started_at)) AS j_queue_end\n FROM default.workflow_job\n PREWHERE created_at <= $__toTime\n AND created_at >= $__fromTime - INTERVAL 24 HOUR\n WHERE arrayExists(x -> startsWith(x, 'mt-l-') OR startsWith(x, 'mt-rel-l-') OR startsWith(x, 'lf-l-') OR startsWith(x, 'lf-rel-l-'), labels)\n AND match(repository_full_name, '^(${repository:regex})$')\n GROUP BY id\n HAVING NOT arrayExists(x -> position(x, 'h100') > 0 OR position(x, 'b200') > 0 OR position(x, 'gb200') > 0 OR position(x, 'a100') > 0, j_labels)\n AND arrayExists(x -> match(x, '^(${runner_name_prefix:regex})$'), j_labels)\n AND (\n (j_runner_group_name = 'meta-prod-aws-ue2' AND match('meta-prod-aws-ue2', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'meta-prod-aws-uw1' AND match('meta-prod-aws-uw1', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'meta-prod-aws-ue1' AND match('meta-prod-aws-ue1', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'lf-prod-aws-ue1' AND match('lf-prod-aws-ue1', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'lf-prod-aws-ue2' AND match('lf-prod-aws-ue2', '^(${cluster:regex})$'))\n OR (j_runner_group_name = '' AND j_status IN ('queued', 'waiting') AND j_last_insert > now() - INTERVAL 3 HOUR)\n )\n AND j_queue_end >= $__fromTime\n) ARRAY JOIN\n arrayDistinct(arrayConcat(\n arrayFilter(\n t -> t >= j_created_at AND t >= $__fromTime AND t <= $__toTime,\n arrayMap(x -> toDateTime64(x, 9),\n range(\n toUInt32(intDiv(toUInt32(greatest(j_created_at, $__fromTime)), 300) * 300),\n toUInt32(intDiv(toUInt32(least(j_queue_end, $__toTime)), 300) * 300) + 300,\n 300\n )\n )\n ),\n if(j_queue_end >= $__fromTime AND j_queue_end <= $__toTime, [j_queue_end], [])\n )) AS bucket_time\nWHERE bucket_time <= j_queue_end\nORDER BY bucket_time" |
1219 | 1219 | }, |
1220 | 1220 | "version": "v0" |
1221 | 1221 | }, |
|
1342 | 1342 | }, |
1343 | 1343 | "pluginVersion": "4.17.0", |
1344 | 1344 | "queryType": "timeseries", |
1345 | | - "rawSql": "SELECT\n bucket_time AS time,\n dateDiff('second', j_created_at, bucket_time) / 60.0 AS queue_minutes\nFROM (\n SELECT\n argMax(created_at, started_at) AS j_created_at,\n argMax(status, started_at) AS j_status,\n argMax(runner_group_name, started_at) AS j_runner_group_name,\n argMax(labels, started_at) AS j_labels,\n max(_inserted_at) AS j_last_insert,\n if(argMax(status, started_at) IN ('queued', 'waiting'), now64(9), argMax(started_at, started_at)) AS j_queue_end\n FROM default.workflow_job\n PREWHERE created_at <= $__toTime\n AND created_at >= $__fromTime - INTERVAL 24 HOUR\n WHERE arrayExists(x -> startsWith(x, 'mt-l-') OR startsWith(x, 'mt-rel-l-') OR startsWith(x, 'lf-l-') OR startsWith(x, 'lf-rel-l-'), labels)\n AND match(repository_full_name, '^(${repository:regex})$')\n GROUP BY id\n HAVING arrayExists(x -> position(x, 'h100') > 0 OR position(x, 'b200') > 0 OR position(x, 'gb200') > 0 OR position(x, 'a100') > 0, j_labels)\n AND arrayExists(x -> match(x, '^(${runner_name_prefix:regex})$'), j_labels)\n AND (\n (j_runner_group_name IN ('default', 'release-runners') AND match('pytorch-arc-cbr-production', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'meta-prod-aws-uw1' AND match('meta-prod-aws-uw1', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'meta-prod-aws-ue1' AND match('meta-prod-aws-ue1', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'lf-prod-aws-ue1' AND match('lf-prod-aws-ue1', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'lf-prod-aws-ue2' AND match('lf-prod-aws-ue2', '^(${cluster:regex})$'))\n OR (j_runner_group_name = '' AND j_status IN ('queued', 'waiting') AND j_last_insert > now() - INTERVAL 3 HOUR)\n )\n AND j_queue_end >= $__fromTime\n) ARRAY JOIN\n arrayDistinct(arrayConcat(\n arrayFilter(\n t -> t >= j_created_at AND t >= $__fromTime AND t <= $__toTime,\n arrayMap(x -> toDateTime64(x, 9),\n range(\n toUInt32(intDiv(toUInt32(greatest(j_created_at, $__fromTime)), 300) * 300),\n toUInt32(intDiv(toUInt32(least(j_queue_end, $__toTime)), 300) * 300) + 300,\n 300\n )\n )\n ),\n if(j_queue_end >= $__fromTime AND j_queue_end <= $__toTime, [j_queue_end], [])\n )) AS bucket_time\nWHERE bucket_time <= j_queue_end\nORDER BY bucket_time" |
| 1345 | + "rawSql": "SELECT\n bucket_time AS time,\n dateDiff('second', j_created_at, bucket_time) / 60.0 AS queue_minutes\nFROM (\n SELECT\n argMax(created_at, started_at) AS j_created_at,\n argMax(status, started_at) AS j_status,\n argMax(runner_group_name, started_at) AS j_runner_group_name,\n argMax(labels, started_at) AS j_labels,\n max(_inserted_at) AS j_last_insert,\n if(argMax(status, started_at) IN ('queued', 'waiting'), now64(9), argMax(started_at, started_at)) AS j_queue_end\n FROM default.workflow_job\n PREWHERE created_at <= $__toTime\n AND created_at >= $__fromTime - INTERVAL 24 HOUR\n WHERE arrayExists(x -> startsWith(x, 'mt-l-') OR startsWith(x, 'mt-rel-l-') OR startsWith(x, 'lf-l-') OR startsWith(x, 'lf-rel-l-'), labels)\n AND match(repository_full_name, '^(${repository:regex})$')\n GROUP BY id\n HAVING arrayExists(x -> position(x, 'h100') > 0 OR position(x, 'b200') > 0 OR position(x, 'gb200') > 0 OR position(x, 'a100') > 0, j_labels)\n AND arrayExists(x -> match(x, '^(${runner_name_prefix:regex})$'), j_labels)\n AND (\n (j_runner_group_name = 'meta-prod-aws-ue2' AND match('meta-prod-aws-ue2', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'meta-prod-aws-uw1' AND match('meta-prod-aws-uw1', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'meta-prod-aws-ue1' AND match('meta-prod-aws-ue1', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'lf-prod-aws-ue1' AND match('lf-prod-aws-ue1', '^(${cluster:regex})$'))\n OR (j_runner_group_name = 'lf-prod-aws-ue2' AND match('lf-prod-aws-ue2', '^(${cluster:regex})$'))\n OR (j_runner_group_name = '' AND j_status IN ('queued', 'waiting') AND j_last_insert > now() - INTERVAL 3 HOUR)\n )\n AND j_queue_end >= $__fromTime\n) ARRAY JOIN\n arrayDistinct(arrayConcat(\n arrayFilter(\n t -> t >= j_created_at AND t >= $__fromTime AND t <= $__toTime,\n arrayMap(x -> toDateTime64(x, 9),\n range(\n toUInt32(intDiv(toUInt32(greatest(j_created_at, $__fromTime)), 300) * 300),\n toUInt32(intDiv(toUInt32(least(j_queue_end, $__toTime)), 300) * 300) + 300,\n 300\n )\n )\n ),\n if(j_queue_end >= $__fromTime AND j_queue_end <= $__toTime, [j_queue_end], [])\n )) AS bucket_time\nWHERE bucket_time <= j_queue_end\nORDER BY bucket_time" |
1346 | 1346 | }, |
1347 | 1347 | "version": "v0" |
1348 | 1348 | }, |
|
1672 | 1672 | "$__all" |
1673 | 1673 | ] |
1674 | 1674 | }, |
1675 | | - "definition": "SELECT DISTINCT extract(runner_name, '^(.+)-[^-]+-runner-[^-]+$') AS prefix FROM default.workflow_job WHERE arrayExists(x -> startsWith(x, 'mt-l-') OR startsWith(x, 'mt-rel-l-') OR startsWith(x, 'lf-l-') OR startsWith(x, 'lf-rel-l-'), labels) AND started_at > now() - INTERVAL 7 DAY AND runner_group_name IN ('default', 'release-runners', 'meta-prod-aws-uw1', 'meta-prod-aws-ue1', 'lf-prod-aws-ue1', 'lf-prod-aws-ue2') AND extract(runner_name, '^(.+)-[^-]+-runner-[^-]+$') != '' ORDER BY prefix", |
| 1675 | + "definition": "SELECT DISTINCT extract(runner_name, '^(.+)-[^-]+-runner-[^-]+$') AS prefix FROM default.workflow_job WHERE arrayExists(x -> startsWith(x, 'mt-l-') OR startsWith(x, 'mt-rel-l-') OR startsWith(x, 'lf-l-') OR startsWith(x, 'lf-rel-l-'), labels) AND started_at > now() - INTERVAL 7 DAY AND runner_group_name IN ('meta-prod-aws-ue2', 'meta-prod-aws-uw1', 'meta-prod-aws-ue1', 'lf-prod-aws-ue1', 'lf-prod-aws-ue2') AND extract(runner_name, '^(.+)-[^-]+-runner-[^-]+$') != '' ORDER BY prefix", |
1676 | 1676 | "hide": "dontHide", |
1677 | 1677 | "includeAll": true, |
1678 | 1678 | "label": "Runner name", |
|
1689 | 1689 | "editorType": "sql", |
1690 | 1690 | "format": 1, |
1691 | 1691 | "queryType": "table", |
1692 | | - "rawSql": "SELECT DISTINCT extract(runner_name, '^(.+)-[^-]+-runner-[^-]+$') AS prefix FROM default.workflow_job WHERE arrayExists(x -> startsWith(x, 'mt-l-') OR startsWith(x, 'mt-rel-l-') OR startsWith(x, 'lf-l-') OR startsWith(x, 'lf-rel-l-'), labels) AND started_at > now() - INTERVAL 7 DAY AND runner_group_name IN ('default', 'release-runners', 'meta-prod-aws-uw1', 'meta-prod-aws-ue1', 'lf-prod-aws-ue1', 'lf-prod-aws-ue2') AND extract(runner_name, '^(.+)-[^-]+-runner-[^-]+$') != '' ORDER BY prefix" |
| 1692 | + "rawSql": "SELECT DISTINCT extract(runner_name, '^(.+)-[^-]+-runner-[^-]+$') AS prefix FROM default.workflow_job WHERE arrayExists(x -> startsWith(x, 'mt-l-') OR startsWith(x, 'mt-rel-l-') OR startsWith(x, 'lf-l-') OR startsWith(x, 'lf-rel-l-'), labels) AND started_at > now() - INTERVAL 7 DAY AND runner_group_name IN ('meta-prod-aws-ue2', 'meta-prod-aws-uw1', 'meta-prod-aws-ue1', 'lf-prod-aws-ue1', 'lf-prod-aws-ue2') AND extract(runner_name, '^(.+)-[^-]+-runner-[^-]+$') != '' ORDER BY prefix" |
1693 | 1693 | }, |
1694 | 1694 | "version": "v0" |
1695 | 1695 | }, |
|
0 commit comments