Skip to content

Conversation

@alenkacz
Copy link
Contributor

@alenkacz alenkacz commented Jul 3, 2025

This should make the warnings more visible and such cases easier to debug.

@jan-g
Copy link
Contributor

jan-g commented Jul 3, 2025

Absolutely spot on. I always intended to have these emitted, it just slipped off the radar.

return nil, errors.WithStack(err)
}

if conf.Warn() != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we instead make this an additional return on Reify? It's much less likely to be forgotten in the case a refactor and it avoids any issues that may pop up due to internal mutability.

Comment on lines +714 to +717
logger := log.FromContext(ctx).WithName(fmt.Sprintf("ClusterReconciler[%T].clusterConfigFor", *rp))
logger.V(log.InfoLevel).Info("warning during configuration processing", warn)

r.EventRecorder.Eventf(rp, "Warning", redpandav1alpha2.EventSeverityError, warn)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating the logger name isn't particularly useful IMO. It's just more text to scroll right of to get the useful part of the log. we'll be searching the log message to find this line if need be.

Additional args should come inkey, value pairs.

I'd also vote to drop the event emission for now. I do think this is a valuable thing to emit as an event but as is this event will be unintelligible and I'm not familiar enough with the event recording interface to recommend a better direction.

Suggested change
logger := log.FromContext(ctx).WithName(fmt.Sprintf("ClusterReconciler[%T].clusterConfigFor", *rp))
logger.V(log.InfoLevel).Info("warning during configuration processing", warn)
r.EventRecorder.Eventf(rp, "Warning", redpandav1alpha2.EventSeverityError, warn)
logger := log.FromContext(ctx)
logger.V(log.InfoLevel).Info("cluster config reification produced warnings", "warnings", warnings)

@chrisseto
Copy link
Contributor

This will need to be backported to release/v25.1.x only :D

@github-actions
Copy link

This PR is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Jul 14, 2025
@github-actions
Copy link

This PR was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this Jul 20, 2025
@chrisseto chrisseto reopened this Jul 21, 2025
@chrisseto chrisseto removed the stale label Jul 21, 2025
@github-actions
Copy link

This PR is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Jul 27, 2025
@github-actions
Copy link

github-actions bot commented Aug 2, 2025

This PR was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this Aug 2, 2025
@RafalKorepta RafalKorepta reopened this Dec 12, 2025
@github-actions
Copy link

This PR is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions
Copy link

This PR is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Dec 24, 2025
@github-actions
Copy link

This PR was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this Dec 29, 2025
@RafalKorepta RafalKorepta reopened this Jan 4, 2026
@RafalKorepta RafalKorepta removed the stale label Jan 4, 2026
@github-actions
Copy link

This PR is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants