Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove custom reconcileID value from OCI HelmRepo logger and context overwrite #887

Merged
merged 2 commits into from
Sep 5, 2022

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 <darkowlzz@protonmail.com>
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 <darkowlzz@protonmail.com>
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.

None yet

3 participants