diff --git a/go.mod b/go.mod index 11b99046..9ea3bfd4 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/BurntSushi/toml v1.4.0 github.com/DATA-DOG/go-sqlmock v1.5.2 - github.com/RedHatInsights/insights-operator-utils v1.25.5 + github.com/RedHatInsights/insights-operator-utils v1.25.6 github.com/RedHatInsights/insights-results-aggregator-data v1.3.9 github.com/RedHatInsights/insights-results-types v1.23.4 github.com/Shopify/sarama v1.27.1 diff --git a/go.sum b/go.sum index 6928b9dd..b1e8769f 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ github.com/RedHatInsights/insights-operator-utils v1.21.0/go.mod h1:B2hizFGwXCc8 github.com/RedHatInsights/insights-operator-utils v1.21.2/go.mod h1:3Pfsgsi7GCu2wgIqQlt1llpyQyyxsDWEGdgnPvadM40= github.com/RedHatInsights/insights-operator-utils v1.21.8/go.mod h1:qa1a8NdarIzcZkr5mu9fBw4OarOfg1qZFZC1vNGbyas= github.com/RedHatInsights/insights-operator-utils v1.24.5/go.mod h1:7qR/8rlMdiqoXAkZyQ5JhVrVNCa6SBwNUt4KMq/17j4= -github.com/RedHatInsights/insights-operator-utils v1.25.5 h1:xyk4UAolH6vAzd+D6zKf6CoyDYsN4lx603qQhGXIxxA= -github.com/RedHatInsights/insights-operator-utils v1.25.5/go.mod h1:T9tCuJUXLThmmcg9sLkj+/ZMExsj7RFTmfyyHiHBCjQ= +github.com/RedHatInsights/insights-operator-utils v1.25.6 h1:r82W8JGO1UUVYwoS8Uy61ok/lO/iN2ljw55S/Rr4igY= +github.com/RedHatInsights/insights-operator-utils v1.25.6/go.mod h1:T9tCuJUXLThmmcg9sLkj+/ZMExsj7RFTmfyyHiHBCjQ= github.com/RedHatInsights/insights-results-aggregator v0.0.0-20200604090056-3534f6dd9c1c/go.mod h1:7Pc15NYXErx7BMJ4rF1Hacm+29G6atzjhwBpXNFMt+0= github.com/RedHatInsights/insights-results-aggregator-data v0.0.0-20200825113234-e84e924194bc/go.mod h1:DcDgoCCmBuUSKQOGrTi0BfFLdSjAp/KxIwyqKUd46sM= github.com/RedHatInsights/insights-results-aggregator-data v0.0.0-20201014142608-de97c4b07d5c/go.mod h1:x8IvreR2g24veCKVMXDPOR6a0D86QK9UCBfi5Xm5Gnc= diff --git a/server/dvo_handlers.go b/server/dvo_handlers.go index 08affe3f..d8ebccc1 100644 --- a/server/dvo_handlers.go +++ b/server/dvo_handlers.go @@ -95,7 +95,7 @@ func validateNamespaceID(namespace string) (string, error) { if !IDValidator.MatchString(namespace) { message := fmt.Sprintf("invalid namespace ID: '%s'", namespace) err := errors.New(message) - log.Error().Err(err).Msg(message) + log.Warn().Err(err).Msg(message) return "", err } @@ -136,7 +136,7 @@ func (server *HTTPServer) getWorkloads(writer http.ResponseWriter, request *http workloads, err := server.StorageDvo.ReadWorkloadsForOrganization(orgID, clusterMap, request.Method == http.MethodPost) if err != nil { - log.Error().Err(err).Msg("Errors retrieving DVO workload recommendations from storage") + log.Warn().Err(err).Msg("Errors retrieving DVO workload recommendations from storage") handleServerError(writer, err) return } @@ -286,7 +286,7 @@ func (server *HTTPServer) ProcessSingleDVONamespace(workload types.DVOReport) ( types.ErrorKey(recommendation.Key), ) if err != nil { - log.Error().Err(err).Msg("error generating composite rule ID for rule") + log.Warn().Err(err).Msg("error generating composite rule ID for rule") continue } diff --git a/server/rating.go b/server/rating.go index 05dec0d4..9afb389b 100644 --- a/server/rating.go +++ b/server/rating.go @@ -39,7 +39,7 @@ func (server *HTTPServer) setRuleRating(writer http.ResponseWriter, request *htt // Split the rule_fqdn (RuleID) and ErrorKey from the received rule ruleID, errorKey, err := getRuleAndErrorKeyFromRuleID(rating.Rule) if err != nil { - log.Error().Err(err).Msg("Unable to parse rule identifier") + log.Warn().Err(err).Msg("Unable to parse rule identifier") handleServerError(writer, err) return } @@ -47,7 +47,7 @@ func (server *HTTPServer) setRuleRating(writer http.ResponseWriter, request *htt // Store to the db err = server.Storage.RateOnRule(orgID, ruleID, errorKey, rating.Rating) if err != nil { - log.Error().Err(err).Msg("Unable to store rating") + log.Warn().Err(err).Msg("Unable to store rating") handleServerError(writer, err) return } @@ -55,7 +55,7 @@ func (server *HTTPServer) setRuleRating(writer http.ResponseWriter, request *htt // If everythig goes fine, we should send the same ratings as response to the client err = responses.SendOK(writer, responses.BuildOkResponseWithData("ratings", rating)) if err != nil { - log.Error().Err(err).Msg("Errors sending response back to client") + log.Warn().Err(err).Msg("Errors sending response back to client") handleServerError(writer, err) return } diff --git a/server/rules.go b/server/rules.go index fe1655aa..a967a5e4 100644 --- a/server/rules.go +++ b/server/rules.go @@ -342,7 +342,7 @@ func (server HTTPServer) getFeedbackAndTogglesOnRule( ) types.RuleOnReport { ruleToggle, err := server.Storage.GetFromClusterRuleToggle(clusterName, rule.Module) if err != nil { - log.Error().Err(err).Msg("Rule toggle was not found") + log.Warn().Err(err).Msg("Rule toggle was not found") rule.Disabled = false } else { rule.Disabled = ruleToggle.Disabled == storage.RuleToggleDisable @@ -351,7 +351,7 @@ func (server HTTPServer) getFeedbackAndTogglesOnRule( disableFeedback, err := server.Storage.GetUserFeedbackOnRuleDisable(clusterName, rule.Module, rule.ErrorKey, userID) if err != nil { - log.Error().Err(err).Msg("Feedback for rule was not found") + log.Warn().Err(err).Msg("Feedback for rule was not found") rule.DisableFeedback = "" } else { log.Info().Msgf("feedback Message: '%v'", disableFeedback.Message) @@ -360,7 +360,7 @@ func (server HTTPServer) getFeedbackAndTogglesOnRule( userVote, err := server.Storage.GetUserFeedbackOnRule(clusterName, rule.Module, rule.ErrorKey, userID) if err != nil { - log.Error().Err(err).Msg("User vote for rule was not found") + log.Warn().Err(err).Msg("User vote for rule was not found") rule.UserVote = types.UserVoteNone } else { rule.UserVote = userVote.UserVote