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

[DPE-5481] Ensure that uninitialized variable not referenced in _is_cluster_blocked helper #507

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

shayancanonical
Copy link
Contributor

Issue

In a debug statement, we are possibly referencing the member_state variable which may not be initialized if a MySQLNoMemberStateError exception is raised

Solution

Ensure that the member_state and member_state_exists variables (both logged) are always initialized if the code execution gets to the logger statement

src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

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

Interesting.

@shayancanonical shayancanonical merged commit f5b7c8f into main Sep 18, 2024
96 checks passed
@shayancanonical shayancanonical deleted the fix/member_state_reference_bug branch September 18, 2024 12:13
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