-
Notifications
You must be signed in to change notification settings - Fork 127
Draft: migrate events to recorder #1653
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
base: develop
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 20819976977Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 20914773279Details
💛 - Coveralls |
| eventPublisher, _ := newK8EventPublisher(c, cr) | ||
|
|
||
| // Get event publisher from context, create one if not present | ||
| var eventPublisher *K8EventPublisher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be
eventPublisher, _ = newK8EventPublisher(nil, cr)
if pub := ctx.Value(splcommon.EventPublisherKey); pub != nil {
eventPublisher, _ = pub.(*K8EventPublisher)
}
| k8sevent.instance = &cmaster | ||
| k8sevent.Normal(ctx, "", "") | ||
|
|
||
| // Use client to avoid unused variable warning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why do we want to keep it then if it is unused?
| scopedLog := reqLogger.WithName("ApplyLicenseMaster") | ||
| eventPublisher, _ := newK8EventPublisher(client, cr) | ||
|
|
||
| // Get event recorder from context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could probably move it to a separate func that could be shared among all files
Description
What does this PR have in it?
Key Changes
Highlight the updates in specific files
Testing and Verification
How did you test these changes? What automated tests are added?
Related Issues
Jira tickets, GitHub issues, Support tickets...
PR Checklist