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

Side by Side Diff: appengine/findit/handlers/triage_analysis.py

Issue 2538373003: [Culprit-Finder] Merge lib/ to libs/. (Closed)
Patch Set: . Created 4 years 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """This module is to handle manual triage of analysis result. 5 """This module is to handle manual triage of analysis result.
6 6
7 This handler will flag the analysis result as correct or incorrect. 7 This handler will flag the analysis result as correct or incorrect.
8 TODO: work on an automatic or semi-automatic way to triage analysis result. 8 TODO: work on an automatic or semi-automatic way to triage analysis result.
9 """ 9 """
10 10
11 from datetime import timedelta 11 from datetime import timedelta
12 12
13 from google.appengine.api import users 13 from google.appengine.api import users
14 from google.appengine.ext import ndb 14 from google.appengine.ext import ndb
15 import pytz.gae 15 import pytz.gae
16 16
17 from common.base_handler import BaseHandler, Permission 17 from common.base_handler import BaseHandler, Permission
18 from lib import time_util 18 from libs import time_util
19 from model import result_status 19 from model import result_status
20 from model.wf_analysis import WfAnalysis 20 from model.wf_analysis import WfAnalysis
21 from waterfall import buildbot 21 from waterfall import buildbot
22 from waterfall.try_job_util import GetSuspectedCLsWithFailures 22 from waterfall.try_job_util import GetSuspectedCLsWithFailures
23 23
24 MATCHING_ANALYSIS_HOURS_AGO_START = 24 24 MATCHING_ANALYSIS_HOURS_AGO_START = 24
25 MATCHING_ANALYSIS_HOURS_AGO_END = 24 25 MATCHING_ANALYSIS_HOURS_AGO_END = 24
26 MATCHING_ANALYSIS_END_BOUND_TIME_ZONE = 'US/Pacific' 26 MATCHING_ANALYSIS_END_BOUND_TIME_ZONE = 'US/Pacific'
27 27
28 28
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 # already logged in. 206 # already logged in.
207 user_name = users.get_current_user().email().split('@')[0] 207 user_name = users.get_current_user().email().split('@')[0]
208 success, original_analysis = _UpdateAnalysisResultStatus( 208 success, original_analysis = _UpdateAnalysisResultStatus(
209 master_name, builder_name, build_number, is_correct, user_name) 209 master_name, builder_name, build_number, is_correct, user_name)
210 num_duplicate_analyses = 0 210 num_duplicate_analyses = 0
211 if success: 211 if success:
212 num_duplicate_analyses = _TriageAndCountDuplicateResults( 212 num_duplicate_analyses = _TriageAndCountDuplicateResults(
213 original_analysis, is_correct, user_name) 213 original_analysis, is_correct, user_name)
214 return {'data': {'success': success, 214 return {'data': {'success': success,
215 'num_duplicate_analyses': num_duplicate_analyses}} 215 'num_duplicate_analyses': num_duplicate_analyses}}
OLDNEW
« no previous file with comments | « appengine/findit/handlers/test/triage_suspected_cl_test.py ('k') | appengine/findit/handlers/triage_suspected_cl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698