Skip to content

Conversation

@darkowlzz
Copy link
Contributor

With the new controller-runtime, the reconcileID is automatically set
per reconciliation and need not be set explicitly. It's was missed in #882
for the OCI helm repository reconciler.

In all the reconcilers, context was overwritten after adding new
log field reconcileID in the logger. Since the reconcileID is now
set by controller-runtime, this is no longer needed. The logger in the
context already has the field set and when the context is passed to
other functions, they too get the logger with the reconcileID set.
Refer #778 where it was introduced.

Follow up of #882

With the new controller-runtime, the reconcileID is automatically set
per reconciliation and need not be set explicitly.

Signed-off-by: Sunny <[email protected]>
Context in the reconcilers were overwritten earlier after adding new
log field `reconcileID` in the logger. Since the `reconcileID` is now
set by controller-runtime, this is no longer needed. The logger in the
context already has the field set and when the context is passed to
other functions, they too have the logger with the reconcileID set.

Signed-off-by: Sunny <[email protected]>
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @darkowlzz

Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

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

LGTM

nice catch @darkowlzz! ⚾

@stefanprodan stefanprodan merged commit f97bbb6 into main Sep 5, 2022
@stefanprodan stefanprodan deleted the rm-log-rec-id branch September 5, 2022 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants