Add restore report and operator summary

This commit is contained in:
2026-05-19 22:15:40 -05:00
parent f3b63bd5e5
commit 6684774f52
5 changed files with 343 additions and 29 deletions

View File

@@ -23,6 +23,7 @@ func executeRestorePlan(
cfg *config.Config,
current *RemoteCurrentState,
plan *RestorePlan,
report *RestoreReport,
store storage.ObjectStore,
) (*RestoreExecutionResult, error) {
if cfg == nil || cfg.Pipeline == nil || cfg.Session == nil {
@@ -61,8 +62,14 @@ func executeRestorePlan(
result := &RestoreExecutionResult{}
for _, action := range actions {
if err := executeRestoreDownloadAction(ctx, cfg, sessionRoot, current, action, store); err != nil {
if report != nil {
report.markFailed(action, err)
}
return nil, fmt.Errorf("install %q from %q: %w", action.LocalRelativePath, action.RemoteKey, err)
}
if report != nil {
report.markDownloaded(action)
}
result.DownloadedCount++
}