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

Unified Diff: pylibs/buildbot/status/builder.py

Issue 809001: Rename a few variables and greatly reduce the amount of data sent for steps* events (Closed)
Patch Set: Rebase against trunk and fix the unit test again Created 10 years, 9 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 | « no previous file | pylibs/buildbot/status/status_push.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylibs/buildbot/status/builder.py
diff --git a/pylibs/buildbot/status/builder.py b/pylibs/buildbot/status/builder.py
index 7cc7dcaa6a2078414d557734c6961e3f477d0b04..6a7238efa214cec87508c535bb5359fb9dbd0ef8 100644
--- a/pylibs/buildbot/status/builder.py
+++ b/pylibs/buildbot/status/builder.py
@@ -738,7 +738,7 @@ class BuildSetStatus:
return self.buildRequests
def isFinished(self):
return self.finished
-
+
def waitUntilSuccess(self):
if self.finished or not self.stillHopeful:
# the deferreds have already fired
@@ -1118,8 +1118,8 @@ class BuildStepStatus(styles.Versioned):
# Transient
result['text'] = self.getText()
result['results'] = self.getResults()
- result['is_started'] = self.isStarted()
- result['is_finished'] = self.isFinished()
+ result['isStarted'] = self.isStarted()
+ result['isFinished'] = self.isFinished()
result['statistics'] = self.statistics
result['times'] = self.getTimes()
result['expectations'] = self.getExpectations()
@@ -1542,8 +1542,9 @@ class BuildStatus(styles.Versioned):
def asDict(self):
result = {}
# Constant
+ result['builderName'] = self.builder.name
result['number'] = self.getNumber()
- result['source_stamp'] = self.getSourceStamp().asDict()
+ result['sourceStamp'] = self.getSourceStamp().asDict()
result['reason'] = self.getReason()
result['requests'] = [r.asDict() for r in self.getRequests()]
result['blame'] = self.getResponsibleUsers()
@@ -1562,9 +1563,9 @@ class BuildStatus(styles.Versioned):
result['eta'] = self.getETA()
result['steps'] = [bss.asDict() for bss in self.steps]
if self.getCurrentStep():
- result['current_step'] = self.getCurrentStep().asDict()
+ result['currentStep'] = self.getCurrentStep().asDict()
else:
- result['current_step'] = None
+ result['currentStep'] = None
return result
@@ -2160,11 +2161,11 @@ class BuilderStatus(styles.Versioned):
current_builds = [b.getNumber() for b in self.currentBuilds]
cached_builds = list(set(self.buildCache.keys() + current_builds))
cached_builds.sort()
- result['cached_builds'] = cached_builds
- result['current_builds'] = current_builds
+ result['cachedBuilds'] = cached_builds
+ result['currentBuilds'] = current_builds
result['state'] = self.getState()[0]
# BuildRequestStatus doesn't have a number so display the SourceStamp.
- result['pending_builds'] = [
+ result['pendingBuilds'] = [
b.getSourceStamp().asDict() for b in self.getPendingBuilds()
]
return result
« no previous file with comments | « no previous file | pylibs/buildbot/status/status_push.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698