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

Unified Diff: dashboard/dashboard/file_bug.py

Issue 2138843003: Add support for setting sheriff-specific bug labels. (Closed) Base URL: https://github.com/catapult-project/catapult@master
Patch Set: Fix unit tests Created 4 years, 5 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 | « dashboard/dashboard/email_template.py ('k') | dashboard/dashboard/file_bug_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/file_bug.py
diff --git a/dashboard/dashboard/file_bug.py b/dashboard/dashboard/file_bug.py
index 2d8674ab42988d9c448ce01bdcabc742e586dfa5..bcb05062be6b454d7363e7a95650e140252710aa 100644
--- a/dashboard/dashboard/file_bug.py
+++ b/dashboard/dashboard/file_bug.py
@@ -25,7 +25,6 @@ from dashboard.models import bug_label_patterns
_DEFAULT_LABELS = [
'Type-Bug-Regression',
'Pri-2',
- 'Performance-Sheriff'
]
_OMAHA_PROXY_URL = 'https://omahaproxy.appspot.com/all.json'
@@ -185,6 +184,9 @@ def _FetchLabelsAndComponents(alert_keys):
labels = set(_DEFAULT_LABELS)
components = set()
alerts = ndb.get_multi(alert_keys)
+ sheriff_keys = set(alert.sheriff for alert in alerts)
+ sheriff_labels = [sheriff.labels for sheriff in ndb.get_multi(sheriff_keys)]
+ labels.update([item for sublist in sheriff_labels for item in sublist])
if any(a.internal_only for a in alerts):
# This is a Chrome-specific behavior, and should ideally be made
# more general (maybe there should be a list in datastore of bug
« no previous file with comments | « dashboard/dashboard/email_template.py ('k') | dashboard/dashboard/file_bug_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698