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

Unified Diff: milo/appengine/buildbot/pubsub.go

Issue 2421713003: Milo: Pubsub - Trim out pending build states if there are more than 25 per builder (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/buildbot/pubsub.go
diff --git a/milo/appengine/buildbot/pubsub.go b/milo/appengine/buildbot/pubsub.go
index 81dd9bfbc5c2b51510ef89f411fedaf17b2a2868..cc3d42a9938e982df8d61d16fb9a9b915e057c03 100644
--- a/milo/appengine/buildbot/pubsub.go
+++ b/milo/appengine/buildbot/pubsub.go
@@ -75,6 +75,15 @@ type buildbotMasterEntry struct {
func putDSMasterJSON(
c context.Context, master *buildbotMaster, internal bool) error {
+ // Trim pending build states. These things are large and we can't really
estaab 2016/10/19 22:09:35 How can we inform consumers that this was trimmed?
hinoka 2016/10/19 22:23:11 We send both the total number of pending builds (i
+ // store more than 25 of them. If this becomes an issue again, we'll have
+ // to trim out things from the pending build state such as the changed
+ // file list, commit comments, etc.
+ for _, builder := range master.Builders {
+ if len(builder.PendingBuildStates) > 25 {
+ builder.PendingBuildStates = builder.PendingBuildStates[0:25]
+ }
+ }
entry := buildbotMasterEntry{
Name: master.Name,
Internal: internal,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698