-
Notifications
You must be signed in to change notification settings - Fork 26
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
knife diff and upload do not understand .rb files #67
Comments
Don't guess. Default to json. But defaults must only be defaults. Defaults must be changeable, and defaults must be overridable. Provide a config option for changing the default. The config option should accept a binary, but should also accept further customization via either a regex matching the role/env name or a proc to which is passed the role/env name. Provide a CLI option for switching per-invocation. |
Great idea! The ability to specify that different directories have different defaults will probably be very useful to some people. And it puts the expression of file extension where it belongs: on the server. I can imagine automatic detection of this (the presence of .rb and absence of .json is a clear indicator of preference), but that seems like a separate issue. |
This should be a good bit easier now, at least from a data format perspective: the data_handler classes (available as a data_handler attribute on most file_system entries) have to_ruby and from_ruby methods. The plumbing to allow format=rb in various directories still needs to be built, but at least there's that to plug into now. |
vagrant-chef-zero would like this fixed someday, then they can drop the Chef dependency. |
A second vote for chef-zero support for this. Why was this closed without a fix? Other issue was also closed. |
@kramvan1 This ticket isn't closed, just no one has gotten around to working on it yet. |
Since knife-essentials is merged into core chef should this bug be moved to the chef project or is it still necessary that it be fixed here? |
Yeah, everything in here needs to move to the chef project (at least everything we still intend to fix). |
You can load environments and roles with .rb files, but knife diff assumes all files were loaded via .json files. This means that if you have environments/blah.rb, and you have a "blah" environment, knife diff will not diff the two and will instead think your local copy "deleted" the environment.
There is a distinct (but intimately related) issue regarding knife download: when there is an entry in the server that is not on the client, should we download that as json or rb? Should we "guess" based on the type of surrounding files?
The text was updated successfully, but these errors were encountered: