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

Fix uninitialized EventRecorder #1427

Merged

Conversation

sundegan
Copy link
Contributor

What this PR does / why we need it:

I've observed that in the pkg/apiserver/manager/manager.go file, instances of EventRecorder are declared for various controller factory methods but are not properly initialized. Although the current codebase does not actively use these EventRecorder instances, if any future modifications attempt to use them, this could lead to runtime panic due to nil pointer dereference. This uninitialized usage poses a risk for potential runtime errors, which could affect the stability of the application.
#1420

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Signed-off-by: sundegan <2226523482@qq.com>
@sundegan sundegan marked this pull request as ready for review March 27, 2024 08:15
Copy link
Member

@SSmallMonster SSmallMonster left a comment

Choose a reason for hiding this comment

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

lgtm

@SSmallMonster SSmallMonster merged commit 7396ad7 into hwameistor:main Apr 1, 2024
3 checks passed
@SSmallMonster SSmallMonster added the kind/bug Categorizes issue or PR as related to a bug. label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants