Skip to content

Commit

Permalink
pkg/operator/utils: Push diff down to the debug level
Browse files Browse the repository at this point in the history
I think it's worth addressing hotlooping issues, and that they'll be
rare enough that we don't have to worry too much about the log level
of the diff.  But Jeremiah is concerned about log volume, and we do
have a hot loop in [1] today that hasn't been fixed yet.  This commit
pushes the diff-rendering down to the debug level.  Users can set
cloudcredentials.operator.openshift.io spec.logLevel to Debug or
higher to see the diff.

[1]: https://issues.redhat.com/browse/OCPBUGS-47505
  • Loading branch information
wking committed Jan 3, 2025
1 parent 0704b4a commit 5a86535
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/operator/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,8 @@ func UpdateStatus(client client.Client, origCR, newCR *minterv1.CredentialsReque

// Update Credentials Request status if changed:
if diff := cmp.Diff(origCR.Status, newCR.Status); diff != "" {
logger.Infof("Updating status due to diff: %v", diff)
logger.Info("Updating status")
logger.Debugf("Status diff: %v", diff)
err := client.Status().Update(context.TODO(), newCR)
if err != nil {
logger.WithError(err).Error("error updating credentials request")
Expand Down

0 comments on commit 5a86535

Please sign in to comment.