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

Unified Diff: appengine/findit/waterfall/build_util.py

Issue 2597373002: [Findit] Flake checker: Get full build info for each flake build analyzed (Closed)
Patch Set: Removing incorrect line 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
Index: appengine/findit/waterfall/build_util.py
diff --git a/appengine/findit/waterfall/build_util.py b/appengine/findit/waterfall/build_util.py
index 01c68611e6f260534013cafee5f67f3b3a062675..313280b37b724f3725e30e7b3cc5417d633e6df1 100644
--- a/appengine/findit/waterfall/build_util.py
+++ b/appengine/findit/waterfall/build_util.py
@@ -20,7 +20,7 @@ def _BuildDataNeedUpdating(build):
return (not build.data or (
not build.completed and (
time_util.GetUTCNow() - build.last_crawled_time
- ).total_seconds() >= 300))
+ ).total_seconds() >= 300))
def DownloadBuildData(master_name, builder_name, build_number):
@@ -57,6 +57,26 @@ def DownloadBuildData(master_name, builder_name, build_number):
return build
+def GetBuildInfo(master_name, builder_name, build_number):
+ """Gets build info given a master, builder, and build number.
+
+ Args:
+ master_name (str): The name of the master.
+ builder_name (str): The name of the builder.
+ build_number (int): The build number.
+
+ Returns:
+ Build information as an instance of BuildInfo.
+ """
+ build = DownloadBuildData(master_name, builder_name, build_number)
+
+ if not build.data:
+ return None
+
+ return buildbot.ExtractBuildInfo(
+ master_name, builder_name, build_number, build.data)
+
+
def GetBuildEndTime(master_name, builder_name, build_number):
build = DownloadBuildData(master_name, builder_name, build_number)
build_info = buildbot.ExtractBuildInfo(

Powered by Google App Engine
This is Rietveld 408576698