From 68c8cd3593c77e365819e38fcdfb547ad90a6080 Mon Sep 17 00:00:00 2001 From: Catherine Lee Date: Wed, 3 Sep 2025 10:48:21 -0700 Subject: [PATCH] tc --- .../per_class_periodic_jobs/query.sql | 24 +++++++------------ .../per_file_periodic_jobs/query.sql | 24 +++++++------------ 2 files changed, 18 insertions(+), 30 deletions(-) diff --git a/torchci/clickhouse_queries/test_times/per_class_periodic_jobs/query.sql b/torchci/clickhouse_queries/test_times/per_class_periodic_jobs/query.sql index 522f02fea3..22ea655d68 100644 --- a/torchci/clickhouse_queries/test_times/per_class_periodic_jobs/query.sql +++ b/torchci/clickhouse_queries/test_times/per_class_periodic_jobs/query.sql @@ -1,23 +1,17 @@ -- same as test_time_per_file query except for the first select WITH good_periodic_sha AS ( - SELECT job.head_sha AS sha + SELECT + w.head_sha AS sha FROM - default.workflow_job job - JOIN default.push ON job.head_sha = push.head_commit.'id' + default .workflow_run w WHERE - job.workflow_name = 'periodic' - AND job.head_branch LIKE 'main' - AND job.repository_full_name = 'pytorch/pytorch' - GROUP BY - job.head_sha, - push.head_commit.'timestamp' - HAVING - groupBitAnd( - job.conclusion = 'success' - AND job.conclusion IS NOT null - ) = 1 + w.name = 'periodic' + AND w.head_branch = 'main' + AND w.repository. 'full_name' = 'pytorch/pytorch' + and w.conclusion = 'success' + and w.run_attempt = 1 ORDER BY - push.head_commit.'timestamp' DESC + w.head_commit. 'timestamp' DESC LIMIT 3 ), diff --git a/torchci/clickhouse_queries/test_times/per_file_periodic_jobs/query.sql b/torchci/clickhouse_queries/test_times/per_file_periodic_jobs/query.sql index c0e57f7f8c..138f2101c9 100644 --- a/torchci/clickhouse_queries/test_times/per_file_periodic_jobs/query.sql +++ b/torchci/clickhouse_queries/test_times/per_file_periodic_jobs/query.sql @@ -1,23 +1,17 @@ -- same as test_time_per_file query except for the first select WITH good_periodic_sha AS ( - SELECT job.head_sha AS sha + SELECT + w.head_sha AS sha FROM - default.workflow_job job - JOIN default.push ON job.head_sha = push.head_commit.'id' + default .workflow_run w WHERE - job.workflow_name = 'periodic' - AND job.head_branch LIKE 'main' - AND job.repository_full_name = 'pytorch/pytorch' - GROUP BY - job.head_sha, - push.head_commit.'timestamp' - HAVING - groupBitAnd( - job.conclusion = 'success' - AND job.conclusion IS NOT null - ) = 1 + w.name = 'periodic' + AND w.head_branch = 'main' + AND w.repository. 'full_name' = 'pytorch/pytorch' + and w.conclusion = 'success' + and w.run_attempt = 1 ORDER BY - push.head_commit.'timestamp' DESC + w.head_commit. 'timestamp' DESC LIMIT 3 ),