From b3bce5d90f986e33f572b30d1832f8c3810f33e7 Mon Sep 17 00:00:00 2001 From: sivakumar subraani Date: Tue, 21 Nov 2023 03:21:27 +0000 Subject: [PATCH] review comments --- pkg/controllers/dataexport/reconcile.go | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkg/controllers/dataexport/reconcile.go b/pkg/controllers/dataexport/reconcile.go index 0ad92b909..62cc00cff 100644 --- a/pkg/controllers/dataexport/reconcile.go +++ b/pkg/controllers/dataexport/reconcile.go @@ -276,16 +276,13 @@ func (c *Controller) sync(ctx context.Context, in *kdmpapi.DataExport) (bool, er kdmpData, err := core.Instance().GetConfigMap(utils.KdmpConfigmapName, utils.KdmpConfigmapNamespace) if err != nil { - logrus.Errorf("failed reading config map %v: %v", utils.KdmpConfigmapName, err) - if err != nil { - msg := fmt.Sprintf("Failed in parsing the excludeFileList configmap parameter from configmap [%v/%v]", utils.KdmpConfigmapNamespace, utils.KdmpConfigmapName) - logrus.Errorf(msg) - data := updateDataExportDetail{ - status: kdmpapi.DataExportStatusFailed, - reason: msg, - } - return false, c.updateStatus(dataExport, data) + msg := fmt.Sprintf("Failed in reading the configmap [%v/%v]", utils.KdmpConfigmapNamespace, utils.KdmpConfigmapName) + logrus.Errorf(msg) + data := updateDataExportDetail{ + status: kdmpapi.DataExportStatusFailed, + reason: msg, } + return false, c.updateStatus(dataExport, data) } else { compressionType = kdmpData.Data[compressionKey] if len(compressionType) == 0 {