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

Unified Diff: appengine/findit/waterfall/identify_try_job_culprit_pipeline.py

Issue 2075423002: [Findit] Group failures by culprit and send notification to codereview. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Clean up. Created 4 years, 6 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
Index: appengine/findit/waterfall/identify_try_job_culprit_pipeline.py
diff --git a/appengine/findit/waterfall/identify_try_job_culprit_pipeline.py b/appengine/findit/waterfall/identify_try_job_culprit_pipeline.py
index 56aed34d4b303d4a1e1998eb2203781d65614329..f5257c459f36ec0930555585734526de1720085a 100644
--- a/appengine/findit/waterfall/identify_try_job_culprit_pipeline.py
+++ b/appengine/findit/waterfall/identify_try_job_culprit_pipeline.py
@@ -3,6 +3,7 @@
# found in the LICENSE file.
from collections import defaultdict
+import logging
from google.appengine.ext import ndb
@@ -15,6 +16,8 @@ from model.wf_analysis import WfAnalysis
from model.wf_try_job import WfTryJob
from model.wf_try_job_data import WfTryJobData
from waterfall.try_job_type import TryJobType
+from waterfall.send_notification_for_culprit_pipeline import (
+ SendNotificationForCulpritPipeline)
GIT_REPO = GitRepository(
@@ -97,6 +100,18 @@ def _GetSuspectedCLs(analysis, result):
return suspected_cls
+def _NotifyCulprits(master_name, builder_name, build_number, culprits):
+ """Sends notifications to the identified culprits."""
+ try:
+ for culprit in (culprits or {}).itervalues():
+ pipeline = SendNotificationForCulpritPipeline(
+ master_name, builder_name, build_number,
+ culprit['repo_name'], culprit['revision'])
+ pipeline.start()
+ except Exception: # pragma: no cover.
+ logging.exception('Failed to notify culprits.')
+
+
class IdentifyTryJobCulpritPipeline(BasePipeline):
"""A pipeline to identify culprit CL info based on try job compile results."""
@@ -326,4 +341,5 @@ class IdentifyTryJobCulpritPipeline(BasePipeline):
# Add try-job results to WfAnalysis.
UpdateWfAnalysisWithTryJobResult()
+ _NotifyCulprits(master_name, builder_name, build_number, culprits)
return result.get('culprit') if result else None
« no previous file with comments | « appengine/findit/model/wf_culprit.py ('k') | appengine/findit/waterfall/send_notification_for_culprit_pipeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698