Chromium Code Reviews| 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, |