-
Notifications
You must be signed in to change notification settings - Fork 143
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 db_cluster_id checks #348
Conversation
@majormoses Is there anything we can do to help get this pushed through a little faster? We have a client who needs this bug fix (and our setup is such that it would make our lives vastly easier if it's fixed in the main upstream repository instead of fixed in a local fork). |
fixes #360 |
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.
LGTM
@@ -161,7 +161,7 @@ def find_db_instance(id) | |||
|
|||
def find_db_cluster_writer(id) | |||
wr = rds.describe_db_clusters(db_cluster_identifier: id).db_clusters[0].db_cluster_members.detect(&:is_cluster_writer).db_instance_identifier | |||
unknown 'DB cluster not found.' if cl.nil? | |||
unknown 'DB cluster not found.' if wr.nil? |
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.
I really dislike short undescriptive variable names like this, I know its outside of the scope of change...I will probably go back in afterwards and fix this up.
@majormoses I really need this fix on a new Sensu Go setup, how to we get the latest version pushed to Bonsai? It's currently stuck at 18.4.0: https://bonsai.sensu.io/assets/sensu-plugins/sensu-plugins-aws |
@jsnod it looks like the bonsai asset deploy failed silently (exited |
Pull Request Checklist
No existing issues found, but resolves an error when using
--db-cluster-id
General
Update Changelog following the conventions laid out here
Update README with any necessary configuration snippets
Binstubs are created if needed
RuboCop passes
Existing tests pass
New Plugins
Tests
Add the plugin to the README
Does it have a complete header as outlined here
Purpose
When an RDS DB Cluster ID is provided instead of an instance ID the check fails due to undefined local variables. This changes two lines to properly parse the
--db-cluster-id
option.Known Compatibility Issues
None.