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

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

Issue 2886353002: Milo: Add an option to hide green steps (Closed)
Patch Set: Retrain 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
« no previous file with comments | « no previous file | milo/appengine/buildbot/expectations/newline.1234.build.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 if the step is not "Success".
230 if bc.Status != resp.Success {
231 bc.Verbosity = resp.Interesting
232 }
233
229 remainingAliases := stringset.New(len(step.Aliases)) 234 remainingAliases := stringset.New(len(step.Aliases))
230 for linkAnchor := range step.Aliases { 235 for linkAnchor := range step.Aliases {
231 remainingAliases.Add(linkAnchor) 236 remainingAliases.Add(linkAnchor)
232 } 237 }
233 238
234 getLinksWithAliases := func(logLink *resp.Link, isLog bool) resp .LinkSet { 239 getLinksWithAliases := func(logLink *resp.Link, isLog bool) resp .LinkSet {
235 // Generate alias links. 240 // Generate alias links.
236 var aliases resp.LinkSet 241 var aliases resp.LinkSet
237 if remainingAliases.Del(logLink.Label) { 242 if remainingAliases.Del(logLink.Label) {
238 stepAliases := step.Aliases[logLink.Label] 243 stepAliases := step.Aliases[logLink.Label]
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 var newAliases map[string][]*buildbotLinkAlias 643 var newAliases map[string][]*buildbotLinkAlias
639 if l := remainingAliases.Len(); l > 0 { 644 if l := remainingAliases.Len(); l > 0 {
640 newAliases = make(map[string][]*buildbotLinkAlias, l) 645 newAliases = make(map[string][]*buildbotLinkAlias, l)
641 remainingAliases.Iter(func(v string) bool { 646 remainingAliases.Iter(func(v string) bool {
642 newAliases[v] = s.Aliases[v] 647 newAliases[v] = s.Aliases[v]
643 return true 648 return true
644 }) 649 })
645 } 650 }
646 s.Aliases = newAliases 651 s.Aliases = newAliases
647 } 652 }
OLDNEW
« no previous file with comments | « no previous file | milo/appengine/buildbot/expectations/newline.1234.build.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698