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

Side by Side Diff: appengine/findit/waterfall/suspected_cl_util.py

Issue 2230103002: [Findit] Pipeline change to save suspected cls to data store. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@0808-resubmit-suspected_cl_model
Patch Set: . Created 4 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from google.appengine.ext import ndb
6
7 from model import analysis_approach_type
8 from model.wf_suspected_cl import WfSuspectedCL
9
10
11 @ndb.transactional
12 def UpdateSuspectedCL(
13 approach, master_name, builder_name, build_number, failure_type,
14 repo_name, revision, commit_position):
15
16 suspected_cl = (
17 WfSuspectedCL.Get(repo_name, revision) or
lijeffrey 2016/08/17 19:31:11 nit: 4 spaces on new lines
chanli 2016/09/12 20:56:15 Done.
18 WfSuspectedCL.Create(repo_name, revision, commit_position))
19
20 if suspected_cl.approach is None:
21 suspected_cl.approach = approach
22 elif suspected_cl.approach != approach:
23 suspected_cl.approach = analysis_approach_type.BOTH
24
25 suspected_cl.failure_type = suspected_cl.failure_type or failure_type
26
27 build_info = [master_name, builder_name, build_number]
28 if build_info not in suspected_cl.builds:
29 suspected_cl.builds.append(build_info)
30
31 suspected_cl.put()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698