Skip to content

Commit

Permalink
OCPBUGS-19387: mark datagather job as failed if the data was not proc…
Browse files Browse the repository at this point in the history
…essed (#830)

Co-authored-by: Tomáš Remeš <tremes@redhat.com>
  • Loading branch information
openshift-cherrypick-robot and tremes committed Oct 3, 2023
1 parent b3495c2 commit 540b588
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/gather_commands.go
Expand Up @@ -238,8 +238,12 @@ func (g *GatherJob) GatherAndUpload(kubeConfig, protoKubeConfig *rest.Config) er
dataProcessedCon.Status = metav1.ConditionFalse
dataProcessedCon.Reason = "Failure"
dataProcessedCon.Message = fmt.Sprintf("failed to process data in the given time: %v", err)
updateDataGatherStatus(ctx, insightsV1alphaCli, dataGatherCR, &dataProcessedCon, insightsv1alpha1.Failed)
return err
}
updateDataGatherStatus(ctx, insightsV1alphaCli, dataGatherCR, &dataProcessedCon, insightsv1alpha1.Completed)
klog.V(4).Infof("Data was successfully processed. New Insights analysis for the request ID %s will be downloaded by the operator",
insightsRequestID)
return nil
}

Expand Down

0 comments on commit 540b588

Please sign in to comment.