Compose resilient CLI processing and report lifecycle
This commit is contained in:
@@ -43,7 +43,7 @@ func Build(input BuildInput) reporting.Snapshot {
|
||||
for i, spec := range input.ModuleSpecs {
|
||||
snapshot.StageNames[i] = spec.InstanceName
|
||||
}
|
||||
if input.RunOutput != nil {
|
||||
if input.RunOutput != nil && input.RunOutput.InventoryAvailable {
|
||||
units := append([]runner.WorkUnitOutcome(nil), input.RunOutput.WorkUnits...)
|
||||
sort.SliceStable(units, func(i, j int) bool {
|
||||
if units[i].ModuleIndex != units[j].ModuleIndex {
|
||||
@@ -200,6 +200,8 @@ func safeMessage(reason outcomes.ReasonCode) string {
|
||||
return "Processing was canceled."
|
||||
case outcomes.ReasonSetupFailure:
|
||||
return "Processing setup failed."
|
||||
case outcomes.ReasonInputInvalid:
|
||||
return "Input was invalid."
|
||||
default:
|
||||
return "Processing failed."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user