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

Unified Diff: milo/appengine/logdog/logDogBuild.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « milo/appengine/logdog/internal/stream.pb.go ('k') | milo/appengine/swarming/build.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/logdog/logDogBuild.go
diff --git a/milo/appengine/logdog/logDogBuild.go b/milo/appengine/logdog/logDogBuild.go
index eb43e331db01b792728a9e69bda6a0af01b758f1..34f2c05d9972730aabf0b024d4f6c0e632836848 100644
--- a/milo/appengine/logdog/logDogBuild.go
+++ b/milo/appengine/logdog/logDogBuild.go
@@ -49,6 +49,9 @@ func miloBuildStep(ub URLBuilder, anno *miloProto.Step, buildCompletedTime, now
case miloProto.FailureDetails_EXCEPTION, miloProto.FailureDetails_INFRA:
comp.Status = resp.InfraFailure
+ case miloProto.FailureDetails_EXPIRED:
+ comp.Status = resp.Expired
+
case miloProto.FailureDetails_DM_DEPENDENCY_FAILED:
comp.Status = resp.DependencyFailure
@@ -147,15 +150,9 @@ func miloBuildStep(ub URLBuilder, anno *miloProto.Step, buildCompletedTime, now
// AddLogDogToBuild takes a set of logdog streams and populate a milo build.
// build.Summary.Finished must be set.
-func AddLogDogToBuild(c context.Context, ub URLBuilder, s *Streams, build *resp.MiloBuild) {
- if s.MainStream == nil {
- panic("missing main stream")
- }
- // Now Fetch the main annotation of the build.
- var (
- mainAnno = s.MainStream.Data
- now = clock.Now(c)
- )
+func AddLogDogToBuild(
+ c context.Context, ub URLBuilder, mainAnno *miloProto.Step, build *resp.MiloBuild) {
+ now := clock.Now(c)
// Now fill in each of the step components.
// TODO(hinoka): This is totes cachable.
« no previous file with comments | « milo/appengine/logdog/internal/stream.pb.go ('k') | milo/appengine/swarming/build.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698