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

Side by Side Diff: milo/appengine/buildbot/build.go

Issue 2886353002: Milo: Add an option to hide green steps (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package buildbot 5 package buildbot
6 6
7 import ( 7 import (
8 "encoding/json" 8 "encoding/json"
9 "errors" 9 "errors"
10 "fmt" 10 "fmt"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 bc.Status = resp.Running 219 bc.Status = resp.Running
220 } else { 220 } else {
221 if len(step.Results) > 0 { 221 if len(step.Results) > 0 {
222 status := int(step.Results[0].(float64)) 222 status := int(step.Results[0].(float64))
223 bc.Status = result2Status(&status) 223 bc.Status = result2Status(&status)
224 } else { 224 } else {
225 bc.Status = resp.Success 225 bc.Status = resp.Success
226 } 226 }
227 } 227 }
228 228
229 // Raise the interesting-ness based off status.
230 switch bc.Status {
231 case resp.Running, resp.Failure, resp.InfraFailure, resp.Excepti on, resp.Warning, resp.WaitingDependency:
nodir 2017/05/18 02:41:04 it seems that all but Success is interesting? if
Ryan Tseng 2017/05/18 22:52:48 Done.
232 bc.Verbosity = resp.Interesting
233 }
234
229 remainingAliases := stringset.New(len(step.Aliases)) 235 remainingAliases := stringset.New(len(step.Aliases))
230 for linkAnchor := range step.Aliases { 236 for linkAnchor := range step.Aliases {
231 remainingAliases.Add(linkAnchor) 237 remainingAliases.Add(linkAnchor)
232 } 238 }
233 239
234 getLinksWithAliases := func(logLink *resp.Link, isLog bool) resp .LinkSet { 240 getLinksWithAliases := func(logLink *resp.Link, isLog bool) resp .LinkSet {
235 // Generate alias links. 241 // Generate alias links.
236 var aliases resp.LinkSet 242 var aliases resp.LinkSet
237 if remainingAliases.Del(logLink.Label) { 243 if remainingAliases.Del(logLink.Label) {
238 stepAliases := step.Aliases[logLink.Label] 244 stepAliases := step.Aliases[logLink.Label]
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 var newAliases map[string][]*buildbotLinkAlias 644 var newAliases map[string][]*buildbotLinkAlias
639 if l := remainingAliases.Len(); l > 0 { 645 if l := remainingAliases.Len(); l > 0 {
640 newAliases = make(map[string][]*buildbotLinkAlias, l) 646 newAliases = make(map[string][]*buildbotLinkAlias, l)
641 remainingAliases.Iter(func(v string) bool { 647 remainingAliases.Iter(func(v string) bool {
642 newAliases[v] = s.Aliases[v] 648 newAliases[v] = s.Aliases[v]
643 return true 649 return true
644 }) 650 })
645 } 651 }
646 s.Aliases = newAliases 652 s.Aliases = newAliases
647 } 653 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698