-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[mysql] Fix bug when options is empty #637
[mysql] Fix bug when options is empty #637
Conversation
@antoinepouille, thanks for your PR! By analyzing the history of the files in this pull request, we identified @truthbk, @gmmeyer and @yannmh to be potential reviewers. |
764f5ac
to
f9936e6
Compare
f9936e6
to
ba6cee8
Compare
mysql/check.py
Outdated
@@ -322,6 +322,8 @@ def _get_config(self, instance): | |||
password = str(instance.get('pass', '')) | |||
tags = instance.get('tags', []) | |||
options = instance.get('options', {}) | |||
if options is None: |
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.
options = instance.get('options', {}) or {}
would be more pythonic. Also a comment to explain why options might be None
would be nice I think.
4c80d84
to
977e90d
Compare
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.
A few details, feel free to merge after
mysql/CHANGELOG.md
Outdated
|
||
### Changes | ||
|
||
* [BUGFIX] MySQL: Fix bug when options dict is empty. See [637][] |
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.
No need to repeate MySQL
in the changelog for the MySQL check
mysql/CHANGELOG.md
Outdated
@@ -1,5 +1,12 @@ | |||
# CHANGELOG - mysql | |||
|
|||
1.0.4 / UNRELEASED |
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 use Unreleased
(the tooling it not perfect right now and expect the exact value)
What does this PR do?
The check was running into an issue when the options: section is empty. Changing it to an empty dict instead of a None value.
Motivation
Customer reported this bug.
Versioning
manifest.json
CHANGELOG.md