-
Notifications
You must be signed in to change notification settings - Fork 897
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
Container managers #connect: don't mutate argument #13719
Conversation
@@ -72,6 +72,7 @@ def verify_ssl_mode | |||
end | |||
|
|||
def connect(options = {}) | |||
options = options.dup |
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.
Since we're touching the values here below anyway, you can actually do:
sanitized_options = options.merge({
:hostname => options[:hostname] || address,
:port => options[:port] || port,
...
})
@cben what about other providers? |
LGTM 👍 @miq-bot assign blomquisg |
Openshift inherits Travis failure is unrelated new brakeman (kbrock has a PR for that). |
@cben I think this part affects the behavior of the "Validate" button in the UI when you're in the process of adding a new provider. Did you check that everything is OK there? |
Interesting (and troubling if so), didn't, will check. |
Checked commit cben@722ab81 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
LGTM 👍 |
@simon3z New provider: main [Validate] works, hawkular [Validate] works, [Add] works. Travis failure was unrelated brakeman, good after rebase. @miq-bot assign blomquisg |
Didn't cause any bugs that I know of, but safer not to do it.
@yaacov Please review