-
-
Notifications
You must be signed in to change notification settings - Fork 555
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 require 'aws-sdk' as needed #183
Conversation
The aws-sdk gem namespace was being called before it was required. Solves sous-chefs#181
+1 |
Avoids the need for including the default recipe if the user installs the SDK via the chef-client cookbooks or via another method. |
I don't I understand why this solves the problem. In these lines, If the It's entirely possible that the class variable name is a misnomer, and that it should be renamed to Will this solve a particular immediate problem? Maybe. Will it continue to prove confusing for others? More likely. |
|
@shortdudey123 Then I must be missing something, because it's right here at the end of the default recipe: https://github.com/chef-cookbooks/aws/blob/master/recipes/default.rb#L26 |
This allows the LWRP to be used without including the default recipe. Use case 1: |
I guess that's reasonable, but the cookbook explicitly states in it's usage that it expects the default recipe to be run prior to any library functions: https://github.com/chef-cookbooks/aws#defaultrb I think that if the desire is to make it a better method for calling the code via LWRP without the default recipe (which, anecdotally, should be safe on every run, what's the danger of including it in a node's run list?), then this would probably be structured in a better manner to DRY up the invocations of |
Fair enough :) |
Pulling the code from the recipe into the provider is correct. Unless someone steps forward to actually do the work of DRY'ing up the requires in the library code, this should probably just get merged, otherwise we're blocking on nobody having enough time to clean it up right and making the perfect the enemy of the good. 👍 we should just ship this unless a better PR appears soon. |
yeah, this is obviously the right thing to do for the cookbook's ergonomics. 👍 |
The aws-sdk gem namespace was being called before it was required.
Solves #181