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

Side by Side Diff: milo/api/resp/build.go

Issue 2254993002: Milo: Add task expired as a failure status (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Use proto instead Created 4 years, 3 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 | « milo/Makefile ('k') | milo/api/resp/status_string.go » ('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 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 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 //go:generate stringer -type=Status,ComponentType,Verbosity 5 //go:generate stringer -type=Status,ComponentType,Verbosity
6 6
7 package resp 7 package resp
8 8
9 import ( 9 import (
10 "encoding/json" 10 "encoding/json"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 // Failure if the component has finished executing and contains a failur e. 124 // Failure if the component has finished executing and contains a failur e.
125 Failure // A200 Red 125 Failure // A200 Red
126 126
127 // Warning just like from the buildbot days. 127 // Warning just like from the buildbot days.
128 Warning // 200 Yellow 128 Warning // 200 Yellow
129 129
130 // InfraFailure if the component has finished incompletely due to a fail ure in infra. 130 // InfraFailure if the component has finished incompletely due to a fail ure in infra.
131 InfraFailure // A100 Purple 131 InfraFailure // A100 Purple
132 132
133 // Expired if the component was never scheduled due to resource exhausti on.
134 Expired // A200 Purple
135
133 // DependencyFailure if the component has finished incompletely due to a failure in a 136 // DependencyFailure if the component has finished incompletely due to a failure in a
134 // dependency. 137 // dependency.
135 DependencyFailure // 100 Amber 138 DependencyFailure // 100 Amber
136 139
137 // WaitingDependency if the component has finished or paused execution d ue to an 140 // WaitingDependency if the component has finished or paused execution d ue to an
138 // incomplete dep. 141 // incomplete dep.
139 WaitingDependency // 100 Brown 142 WaitingDependency // 100 Brown
140 ) 143 )
141 144
142 // Terminal returns true if the step status won't change. 145 // Terminal returns true if the step status won't change.
143 func (s Status) Terminal() bool { 146 func (s Status) Terminal() bool {
144 switch s { 147 switch s {
145 » case Success, Failure, InfraFailure, Warning, DependencyFailure: 148 » case Success, Failure, InfraFailure, Warning, DependencyFailure, Expired :
146 return true 149 return true
147 default: 150 default:
148 return false 151 return false
149 } 152 }
150 } 153 }
151 154
152 // MarshalJSON renders enums into String rather than an int when marshalling. 155 // MarshalJSON renders enums into String rather than an int when marshalling.
153 func (s Status) MarshalJSON() ([]byte, error) { 156 func (s Status) MarshalJSON() ([]byte, error) {
154 return json.Marshal(s.String()) 157 return json.Marshal(s.String())
155 } 158 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 279
277 // An icon for the link. Not compatible with label. Rendered as <img> 280 // An icon for the link. Not compatible with label. Rendered as <img>
278 Img string 281 Img string
279 282
280 // The destination for the link, stuck in a <a href> tag. 283 // The destination for the link, stuck in a <a href> tag.
281 URL string 284 URL string
282 285
283 // Alt text for the image, only supported with img. 286 // Alt text for the image, only supported with img.
284 Alt string 287 Alt string
285 } 288 }
OLDNEW
« no previous file with comments | « milo/Makefile ('k') | milo/api/resp/status_string.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698