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

Unified Diff: firefighter/update/common/buildbot/builds.py

Issue 2400053002: Use CBE for firefighter (Closed)
Patch Set: Created 4 years, 2 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 | « firefighter/base/constants.py ('k') | firefighter/update/common/buildbot/network.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: firefighter/update/common/buildbot/builds.py
diff --git a/firefighter/update/common/buildbot/builds.py b/firefighter/update/common/buildbot/builds.py
index 55e9cd3a3d302a9acdd7e02664a6410fbc181283..8f6cb6cec948877b94f38015bdfa92a449df8567 100644
--- a/firefighter/update/common/buildbot/builds.py
+++ b/firefighter/update/common/buildbot/builds.py
@@ -60,27 +60,17 @@ class Builds(object):
if build_number < 0:
raise ValueError('Invalid build number: %d' % build_number)
- build_query = urllib.urlencode(
- [('select', build_number) for build_number in build_numbers])
- url = 'json/builders/%s/builds/?%s' % (
- urllib.quote(self._builder_name), build_query)
- url = network.BuildUrl(self._master_name, url)
- try:
- builds = network.FetchData(url).values()
- except (ValueError, urlfetch.ResponseTooLargeError):
martiniss 2016/10/06 22:56:33 I removed this logic because CBE doesn't support t
dtu 2016/10/07 17:10:55 Yeah, that's fine. It was only because BuildBot wa
- # The JSON decode failed, or the data was too large.
- # Try downloading the builds individually instead.
- builds = []
- for build_number in build_numbers:
- url = 'json/builders/%s/builds/%d' % (
- urllib.quote(self._builder_name), build_number)
- url = network.BuildUrl(self._master_name, url)
- try:
- builds.append(network.FetchData(url))
- except (ValueError, urlfetch.ResponseTooLargeError):
- logging.warning('Unable to fetch %s build %d',
- self._master_name, build_number)
- continue
+ builds = []
+ for build_number in build_numbers:
+ url = 'json/builders/%s/builds/%d' % (
+ urllib.quote(self._builder_name), build_number)
+ url = network.BuildUrl(self._master_name, url, use_cbe=True)
+ try:
+ builds.append(network.FetchData(url))
+ except (ValueError, urlfetch.ResponseTooLargeError):
+ logging.warning('Unable to fetch %s/%s build %d',
+ self._master_name, self._builder_name, build_number)
+ continue
for build_data in builds:
if 'error' in build_data:
« no previous file with comments | « firefighter/base/constants.py ('k') | firefighter/update/common/buildbot/network.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698