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

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

Issue 2387153002: Report all flakes reported to issue tracker also to FindIt (Closed)
Patch Set: Addressed comments Created 4 years, 2 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/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 db0e14f59be49151e9ac05e0937e58986ea6bfb9..a57db6c78c2536fab6067b883a2f3fe3407cd424 100644
--- a/appengine/chromium_try_flakes/handlers/flake_issues.py
+++ b/appengine/chromium_try_flakes/handlers/flake_issues.py
@@ -17,6 +17,7 @@ from google.appengine.api import users
from google.appengine.ext import ndb
from apiclient.errors import HttpError
+from findit import findit
import gae_ts_mon
from issue_tracker import issue_tracker_api, issue
from model.flake import (
@@ -215,6 +216,11 @@ class ProcessIssue(webapp2.RequestHandler):
occ.issue_id = issue_id
ndb.put_multi(new_flaky_runs)
+ @staticmethod
+ @ndb.non_transactional
+ def _report_flakes_to_findit(flake, flaky_runs):
+ findit.FindItAPI().flake(flake, flaky_runs)
+
@ndb.transactional
def _update_issue(self, api, flake, new_flakes, now):
"""Updates an issue on the issue tracker."""
@@ -271,6 +277,8 @@ class ProcessIssue(webapp2.RequestHandler):
flake.num_reported_flaky_runs = len(flake.occurrences)
flake.issue_last_updated = now
+ self._report_flakes_to_findit(flake, new_flakes)
+
@ndb.transactional
def _create_issue(self, api, flake, new_flakes, now):
_, qlabel = get_queue_details(flake.name)
@@ -306,6 +314,8 @@ class ProcessIssue(webapp2.RequestHandler):
logging.info('Created a new issue %d for flake %s', flake.issue_id,
flake.name)
+ self._report_flakes_to_findit(flake, new_flakes)
+
# Find all flakes in the current flakiness period to compute metrics. The
# flakiness period is a series of flakes with a gap no larger than
# MAX_GAP_FOR_FLAKINESS_PERIOD seconds.

Powered by Google App Engine
This is Rietveld 408576698