Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2446)

Unified Diff: appengine/chromium_try_flakes/handlers/flake_issues.py

Issue 2007133005: Cap the maximum number of flaky tests that we record from a step (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Added test Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/chromium_try_flakes/handlers/test/flake_issues_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/chromium_try_flakes/handlers/flake_issues.py
diff --git a/appengine/chromium_try_flakes/handlers/flake_issues.py b/appengine/chromium_try_flakes/handlers/flake_issues.py
index dd158c2f3b83b6cf8c2f5e2115ffc7e231cf924e..371cdd2c6b8f30bcef36dfadeae1cc8ad09a68ca 100644
--- a/appengine/chromium_try_flakes/handlers/flake_issues.py
+++ b/appengine/chromium_try_flakes/handlers/flake_issues.py
@@ -30,6 +30,7 @@ MIN_REQUIRED_FLAKY_RUNS = 3
DAYS_TILL_STALE = 30
USE_MONORAIL = True
DAYS_TO_REOPEN_ISSUE = 3
+MAX_INDIVIDUAL_FLAKES_PER_STEP = 50
FLAKY_RUNS_TEMPLATE = (
'Detected %(new_flakes_count)d new flakes for test/step "%(name)s". To see '
'the actual flakes, please visit %(flakes_url)s. This message was posted '
@@ -508,6 +509,8 @@ class CreateFlakyRun(webapp2.RequestHandler):
_, failed, _ = cls._flatten_tests(
json_result.get('tests', {}),
json_result.get('path_delimiter', '/'))
+ if len(failed) > MAX_INDIVIDUAL_FLAKES_PER_STEP:
+ return [stepname], True
return failed, False
if result.status_code == 404:
« no previous file with comments | « no previous file | appengine/chromium_try_flakes/handlers/test/flake_issues_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698