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

Add database connection helper #61

Merged
merged 4 commits into from Nov 17, 2015

Conversation

patcon
Copy link
Contributor

@patcon patcon commented Oct 1, 2015

Addresses #56

As mentioned in that issue, this is to simplify wrapper cookbooks.

@bflad
Copy link
Contributor

bflad commented Oct 1, 2015

Please fix Rubocop whitespace and tell it to ignore other error, then LGTM.

@legal90
Copy link
Contributor

legal90 commented Oct 1, 2015

@patcon It looks good!

Let's move the default port management to this new confluence_database_connection helper?
https://github.com/bflad/chef-confluence/blob/master/libraries/helpers.rb#L50-L57

@patcon
Copy link
Contributor Author

patcon commented Oct 1, 2015

Thanks :)

Would it not make sense that the order of derivation is as follows:

node >> merged_confluence_settings >> confluence_database_connection

node (just attributes)
merged_confluence_settings (attributes + databag)
confluence_database_connection (high-level helper for settings data)

Mixing that up could lead to wonky unexpected behaviour in some use-cases. Like it someone sets database type in the databag, and the conf database connection helper isn't using settings as the source of truth.

Sorry, maybe I'm being pedantic :) I don't even use the databag feature, but it seems settings should have all the data it can be easily loaded with :)

EDIT: Heh. On second thought, it's all good. I'll make your suggested change later :)

@legal90
Copy link
Contributor

legal90 commented Oct 1, 2015

Oh, yeah. It sounds reasonable. Then let it be as is.

Please, fix the Rubocop warnings

@patcon
Copy link
Contributor Author

patcon commented Nov 16, 2015

Ah, lost track of this, but fixed the rubocop errors. Should be good to merge :)

@patcon
Copy link
Contributor Author

patcon commented Nov 16, 2015

Testing cleanly against standalone-postgresql-ubuntu-1404 and standalone-mysql-ubuntu-1404

@@ -20,14 +20,20 @@ platforms:
image: centos-7-0-x64

- name: ubuntu-12.04
run_list:
- recipe[apt]

This comment was marked as outdated.

This comment was marked as outdated.

@legal90
Copy link
Contributor

legal90 commented Nov 17, 2015

@patcon Thanks!

legal90 added a commit that referenced this pull request Nov 17, 2015
@legal90 legal90 merged commit 8df7dfa into sous-chefs:master Nov 17, 2015
@lock
Copy link

lock bot commented Oct 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants