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

Unified Diff: dashboard/dashboard/file_bug.py

Issue 2618413002: Only label milestones for ChromiumPerf and ChromiumPerfFyi and corresponding test. (Closed)
Patch Set: Updates milestone label to use r_commit_pos if available. Created 3 years, 11 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/common/utils.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 3bca816800b837309b6bc4d0bd216bf4212b2ae6..cc30ad9641c1c5ba24b94cff0df55cbe091d29df 100644
--- a/dashboard/dashboard/file_bug.py
+++ b/dashboard/dashboard/file_bug.py
@@ -232,24 +232,26 @@ def _MilestoneLabel(alerts):
Chromium milestones, do not label them (see
https://github.com/catapult-project/catapult/issues/2906).
"""
- revisions = [a.start_revision for a in alerts if hasattr(a, 'start_revision')]
+ revisions = [a.end_revision for a in alerts if hasattr(a, 'end_revision')]
if not revisions:
return None
- start_revision = min(revisions)
-
+ end_revision = min(revisions)
for a in alerts:
- if a.start_revision == start_revision:
- master = utils.TestPath(a.GetTestMetadataKey()).split('/')[0]
- if master != 'ChromiumPerf' and master != 'ChromiumPerfFyi':
+ if a.end_revision == end_revision:
+ row_key = utils.GetRowKey(a.test, a.end_revision)
+ row = row_key.get()
+ if hasattr(row, 'r_commit_pos'):
+ end_revision = row.r_commit_pos
+ else:
return None
break
try:
- milestone = _GetMilestoneForRevision(start_revision)
+ milestone = _GetMilestoneForRevision(end_revision)
except KeyError:
logging.error('List of versions not in the expected format')
if not milestone:
return None
- logging.info('Matched rev %s to milestone %s.', start_revision, milestone)
+ logging.info('Matched rev %s to milestone %s.', end_revision, milestone)
return 'M-%d' % milestone
@@ -260,7 +262,7 @@ def _GetMilestoneForRevision(revision):
by a suspected regression. We do this by locating in the list of current
versions, regardless of platform and channel, all the version strings (e.g.
36.0.1234.56) that match revisions (commit positions) later than the earliest
- possible start_revision of the suspected regression; we then parse out the
+ possible end_revision of the suspected regression; we then parse out the
first numeric part of such strings, assume it to be the corresponding
milestone, and return the lowest one in the set.
« no previous file with comments | « dashboard/dashboard/common/utils.py ('k') | dashboard/dashboard/file_bug_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698