-
Notifications
You must be signed in to change notification settings - Fork 28
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
Convert to basic 12.5 resources #82
Conversation
3b3ba3a
to
6b1e076
Compare
|
||
private | ||
|
||
action_class.class_eval do |
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.
It seems non-intuitive for authors that we have just exchanged providers
for action_class
. What would you think about delegating create_acl
from the action_class to the resource? Then we wouldn't need this class_eval
.
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.
Also, what happens if there are multiple 'providers' for a single resource? Are there multiple action_class
es?
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 think there are a lot of changes we can and should make after moving it over, but was just trying to get it moved in bulk before that sort of surgery. All changes here are purely cosmetic.
There is only ever one provider for a single resource. If you fork a resource to different OS's, you just create new subclass resources.
Just tried this locally - this won't work with |
@tyler-ball I'm not sure why chef-zero dep is set to 4.3, but if current cheffish doesn't work with 12.4.3, doesn't that mean current chef-provisioning can't pull in current cheffish? Is that an issue? The intent of using compat_resource is to preserve compatibility with older versions that already exists. If we're truly incompatible with older versions of chef-zero (I bet it has more to do with test suites than the actual software), then that seems like a bigger issue. Happy to remove the compat_resource line if we're 12.5 only, but I doubt that's our intent :) |
Error that I just found using this Cheffish, master of Chef and master of chef-provisioning
|
7dcb1b1 fixed my previous error - I'm not seeing any errors now! Successfully converged a chef-provisioning resource. Still cannot use this with chef 12.4.3 because of #82 (comment) - we should see if we can relax the |
7dcb1b1
to
b600412
Compare
attribute :encrypt, :kind_of => [TrueClass, FalseClass] | ||
#attribute :secret, :kind_of => String | ||
property :encrypt, :kind_of => [TrueClass, FalseClass] | ||
#property :secret, :kind_of => String |
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.
Any reason not to just delete this?
👍 It seems like it'd be nice to delete commented-out properties rather than changing them as though they matter, but it's not that important. |
👍 |
This just descends everything from CompatResource and makes necessary adjustments. More changes to follow.