Skip to content

Commit

Permalink
RHINENG-9505: DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMraka committed Sep 11, 2024
1 parent 39798ae commit 285eaca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions manager/controllers/template_systems_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func TemplateSystemsUpdateHandler(c *gin.Context) {
if err != nil {
return
}
utils.LogDebug("TemplateSystemsUpdateHandler env assigned")

// re-evaluate systems added/removed from templates
if config.EnableTemplateChangeEval {
Expand Down Expand Up @@ -172,16 +173,19 @@ func templateArchVersionMatch(
func callCandlepin(ctx context.Context, consumer string, request *candlepin.ConsumersUpdateRequest) (
*candlepin.ConsumersUpdateResponse, error) {
candlepinEnvConsumersURL := utils.CoreCfg.CandlepinAddress + "/consumers/" + consumer
utils.LogDebug("candlepinEnvConsumersURL ", candlepinEnvConsumersURL)
candlepinFunc := func() (interface{}, *http.Response, error) {
utils.LogTrace("request", *request, "candlepin /consumers request")
candlepinResp := candlepin.ConsumersUpdateResponse{}
resp, err := candlepinClient.Request(&ctx, http.MethodPut, candlepinEnvConsumersURL, request, &candlepinResp)
utils.LogDebug("resp", resp, "err", err, "candlepinClient.Request()")
statusCode := utils.TryGetStatusCode(resp)
utils.LogDebug("status_code", statusCode, "candlepin /consumers call")
utils.LogTrace("response", resp, "candlepin /consumers response")
if err != nil && statusCode == 400 {
err = errors.Wrap(errCandlepin, err.Error())
}
utils.LogDebug("return callCandlepin")
return &candlepinResp, resp, err
}

Expand Down Expand Up @@ -225,6 +229,7 @@ func assignCandlepinEnvironment(db *gorm.DB, accountID int, env *string, invento
err = errors2.Join(err, apiErr, errors.New(resp.Message))
}
}
utils.LogDebug("return assignCandlepinEnvironment")

return err
}

0 comments on commit 285eaca

Please sign in to comment.