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

[mysql] Fix bug when options is empty #637

Merged
merged 4 commits into from
Jul 28, 2017

Conversation

antoinepouille
Copy link
Contributor

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

  • Bumped the version check in manifest.json
  • Updated CHANGELOG.md

@antoinepouille antoinepouille added this to the 5.17 milestone Jul 28, 2017
@bits-bot
Copy link
Collaborator

@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.

@antoinepouille antoinepouille force-pushed the antoine/fix-mysql-bug-noinnodb-options branch from 764f5ac to f9936e6 Compare July 28, 2017 13:06
@antoinepouille antoinepouille force-pushed the antoine/fix-mysql-bug-noinnodb-options branch from f9936e6 to ba6cee8 Compare July 28, 2017 13:25
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:
Copy link
Member

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.

@antoinepouille antoinepouille force-pushed the antoine/fix-mysql-bug-noinnodb-options branch from 4c80d84 to 977e90d Compare July 28, 2017 15:33
hush-hush
hush-hush previously approved these changes Jul 28, 2017
Copy link
Member

@hush-hush hush-hush left a 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


### Changes

* [BUGFIX] MySQL: Fix bug when options dict is empty. See [637][]
Copy link
Member

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

@@ -1,5 +1,12 @@
# CHANGELOG - mysql

1.0.4 / UNRELEASED
Copy link
Member

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)

@antoinepouille antoinepouille merged commit 4c5dbab into master Jul 28, 2017
@antoinepouille antoinepouille deleted the antoine/fix-mysql-bug-noinnodb-options branch July 31, 2017 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants