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

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

Issue 2007783003: [Findit] Make sure build data is updated when use build master. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: . Created 4 years, 7 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
« no previous file with comments | « no previous file | appengine/findit/waterfall/test/build_util_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 from datetime import datetime 5 from datetime import datetime
6 6
7 from common.http_client_appengine import HttpClientAppengine as HttpClient 7 from common.http_client_appengine import HttpClientAppengine as HttpClient
8 from model.wf_build import WfBuild 8 from model.wf_build import WfBuild
9 from waterfall import buildbot 9 from waterfall import buildbot
10 from waterfall import lock_util 10 from waterfall import lock_util
(...skipping 27 matching lines...) Expand all
38 # Retrieve build data from build archive first. 38 # Retrieve build data from build archive first.
39 build.data = buildbot.GetBuildDataFromArchive( 39 build.data = buildbot.GetBuildDataFromArchive(
40 master_name, builder_name, build_number, HTTP_CLIENT_NO_404_ERROR) 40 master_name, builder_name, build_number, HTTP_CLIENT_NO_404_ERROR)
41 41
42 if build.data: 42 if build.data:
43 build.data_source = CHROME_BUILD_EXTRACT 43 build.data_source = CHROME_BUILD_EXTRACT
44 elif not lock_util.WaitUntilDownloadAllowed( 44 elif not lock_util.WaitUntilDownloadAllowed(
45 master_name): # pragma: no cover 45 master_name): # pragma: no cover
46 return None 46 return None
47 47
48 if not build.data: 48 if not build.data or not use_cbe:
49 # Retrieve build data from build master. 49 # Retrieve build data from build master.
50 build.data = buildbot.GetBuildDataFromBuildMaster( 50 build.data = buildbot.GetBuildDataFromBuildMaster(
51 master_name, builder_name, build_number, HTTP_CLIENT_LOGGING_ERRORS) 51 master_name, builder_name, build_number, HTTP_CLIENT_LOGGING_ERRORS)
52 build.data_source = BUILDBOT_MASTER 52 build.data_source = BUILDBOT_MASTER
53 53
54 build.last_crawled_time = datetime.utcnow() 54 build.last_crawled_time = datetime.utcnow()
55 build.put() 55 build.put()
56 56
57 return build 57 return build
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/waterfall/test/build_util_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698