Skip to content

Commit

Permalink
pb-4943: Added fix to return proper error message, if the kdmp backup
Browse files Browse the repository at this point in the history
fails in DataExportStageTransferInProgress stage.

	- Currently, we are passing empty reason for the failed case, so
	  the reason is not passed to the UI. In the failed case, it shows empty reason.
  • Loading branch information
sivakumar subraani committed Dec 11, 2023
1 parent e8a1e0c commit c23e283
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/controllers/dataexport/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,19 @@ func (c *Controller) sync(ctx context.Context, in *kdmpapi.DataExport) (bool, er
}
return true, c.updateStatus(dataExport, data)
case kdmpapi.DataExportStageTransferInProgress:
var reason string
if dataExport.Status.Status == kdmpapi.DataExportStatusSuccessful {
reason = ""
} else {
reason = dataExport.Status.Reason
}
if dataExport.Status.Status == kdmpapi.DataExportStatusSuccessful ||
dataExport.Status.Status == kdmpapi.DataExportStatusFailed {
// set to the next stage
data := updateDataExportDetail{
stage: kdmpapi.DataExportStageCleanup,
status: dataExport.Status.Status,
reason: "",
reason: reason,
}
return false, c.updateStatus(dataExport, data)
}
Expand Down

0 comments on commit c23e283

Please sign in to comment.