Merge pull request #12167 from dgquintas/detect_flakes_3
Fixed off by one error in detect flakes script
diff --git a/tools/flakes/detect_flakes.py b/tools/flakes/detect_flakes.py
index c59cb18..3289907 100644
--- a/tools/flakes/detect_flakes.py
+++ b/tools/flakes/detect_flakes.py
@@ -57,7 +57,7 @@
FROM
[grpc-testing:jenkins_test_results.aggregate_results]
WHERE
- timestamp >= DATE_ADD(CURRENT_DATE(), {days_lower_bound}, "DAY")
+ timestamp > DATE_ADD(CURRENT_DATE(), {days_lower_bound}, "DAY")
AND timestamp <= DATE_ADD(CURRENT_DATE(), {days_upper_bound}, "DAY")
AND NOT REGEXP_MATCH(job_name, '.*portability.*')
AND result != 'PASSED' AND result != 'SKIPPED'
@@ -76,7 +76,7 @@
def get_new_flakes():
last_week_sans_yesterday = get_flaky_tests(-14, -1)
- last_24 = get_flaky_tests(-1, +1)
+ last_24 = get_flaky_tests(0, +1)
last_week_sans_yesterday_names = set(last_week_sans_yesterday.keys())
last_24_names = set(last_24.keys())
logging.debug('|last_week_sans_yesterday| =', len(last_week_sans_yesterday_names))