| OLD | NEW |
| 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 package annotation | 5 package annotation |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "fmt" | 8 "fmt" |
| 9 "sort" | 9 "sort" |
| 10 "strconv" | 10 "strconv" |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 | 600 |
| 601 // Close our outstanding substeps, and get their highest status value. | 601 // Close our outstanding substeps, and get their highest status value. |
| 602 stepStatus := milo.Status_SUCCESS | 602 stepStatus := milo.Status_SUCCESS |
| 603 for _, sub := range as.substeps { | 603 for _, sub := range as.substeps { |
| 604 sub.Close(closeTime) | 604 sub.Close(closeTime) |
| 605 if sub.StepComponent.Status > stepStatus { | 605 if sub.StepComponent.Status > stepStatus { |
| 606 stepStatus = sub.StepComponent.Status | 606 stepStatus = sub.StepComponent.Status |
| 607 } | 607 } |
| 608 } | 608 } |
| 609 | 609 |
| 610 » // Close any ourstanding log streams. | 610 » // Close any oustanding log streams. |
| 611 for l := range as.logLines { | 611 for l := range as.logLines { |
| 612 as.LogEnd(l) | 612 as.LogEnd(l) |
| 613 } | 613 } |
| 614 | 614 |
| 615 // If a status is provided, use it. | 615 // If a status is provided, use it. |
| 616 if sp != nil { | 616 if sp != nil { |
| 617 stepStatus = *sp | 617 stepStatus = *sp |
| 618 } | 618 } |
| 619 | 619 |
| 620 if as.StepComponent.Status == milo.Status_RUNNING { | 620 if as.StepComponent.Status == milo.Status_RUNNING { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 func (as *Step) EnsureSubstepLogNameBase(name types.StreamName) bool { | 776 func (as *Step) EnsureSubstepLogNameBase(name types.StreamName) bool { |
| 777 nameStr := string(name) | 777 nameStr := string(name) |
| 778 for _, lnb := range as.SubstepLogdogNameBase { | 778 for _, lnb := range as.SubstepLogdogNameBase { |
| 779 if lnb == nameStr { | 779 if lnb == nameStr { |
| 780 return false | 780 return false |
| 781 } | 781 } |
| 782 } | 782 } |
| 783 as.SubstepLogdogNameBase = append(as.SubstepLogdogNameBase, nameStr) | 783 as.SubstepLogdogNameBase = append(as.SubstepLogdogNameBase, nameStr) |
| 784 return true | 784 return true |
| 785 } | 785 } |
| OLD | NEW |