Keep failed processing reports consistent
This commit is contained in:
@@ -96,10 +96,15 @@ func prepareProcess(ctx context.Context, input processInput, loaded *processInpu
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
snapshot.Status = reporting.StatusFailed
|
||||
failed, err := renderReportBundle(snapshot, secrets...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
failed := func(primary error, failures []diagnostics.FileFailure) diagnostics.ReportBundle {
|
||||
failedSnapshot := snapshot
|
||||
completed := time.Now().UTC()
|
||||
failedSnapshot.CompletedAt = &completed
|
||||
if primary != nil {
|
||||
failedSnapshot.Errors = []reporting.ErrorRecord{{Scope: "run", Phase: "initialization", Reason: "canceled", Message: "Processing was canceled."}}
|
||||
}
|
||||
bundle, _ := renderReportBundle(failedOutputSnapshot(failedSnapshot, failures), secrets...)
|
||||
return bundle
|
||||
}
|
||||
var debug *preflight.DebugInput
|
||||
var warnings []error
|
||||
|
||||
Reference in New Issue
Block a user