Skip to content

Commit

Permalink
Set operation progress update time for VS BIA on completion.
Browse files Browse the repository at this point in the history
Signed-off-by: Xun Jiang <[email protected]>
  • Loading branch information
blackpiglet committed Mar 29, 2024
1 parent 36e5755 commit 4511589
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/backup/volumesnapshot_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,14 @@ func (p *VolumeSnapshotBackupItemAction) Progress(operationID string, backup *ve
return progress, nil
}

now := time.Now()

if boolptr.IsSetToTrue(vsc.Status.ReadyToUse) {
progress.Completed = true
progress.Updated = now
} else if vsc.Status.Error != nil {
progress.Completed = true
progress.Updated = now
if vsc.Status.Error.Message != nil {
progress.Err = *vsc.Status.Error.Message
}
Expand Down

0 comments on commit 4511589

Please sign in to comment.