diff options
-rw-r--r-- | CHANGELOG.md | 28 | ||||
-rw-r--r-- | Gemfile.lock | 26 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb | 8 | ||||
-rw-r--r-- | acceptance/Gemfile.lock | 26 | ||||
-rw-r--r-- | chef-config/lib/chef-config/config.rb | 4 | ||||
-rw-r--r-- | chef-config/lib/chef-config/version.rb | 2 | ||||
-rw-r--r-- | lib/chef/property.rb | 8 | ||||
-rw-r--r-- | lib/chef/resource_builder.rb | 6 | ||||
-rw-r--r-- | lib/chef/version.rb | 2 | ||||
-rw-r--r-- | spec/unit/recipe_spec.rb | 21 |
11 files changed, 99 insertions, 34 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 549b63abba..908189044a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Change Log +## [v12.12.13](https://github.com/chef/chef/tree/v12.12.13) (2016-07-01) +[Full Changelog](https://github.com/chef/chef/compare/v12.11.18...v12.12.13) + +**Implemented Enhancements:** + +- Tweak 3694 warnings [\#5075](https://github.com/chef/chef/pull/5075) ([lamont-granquist](https://github.com/lamont-granquist)) +- Adding node object to Data collector run\_converge message [\#5065](https://github.com/chef/chef/pull/5065) ([adamleff](https://github.com/adamleff)) +- Attribute API improvements [\#5029](https://github.com/chef/chef/pull/5029) ([lamont-granquist](https://github.com/lamont-granquist)) +- Remove deprecated Thread.exclusive around require call. [\#5068](https://github.com/chef/chef/pull/5068) ([maxlazio](https://github.com/maxlazio)) +- Ensure that chef-solo uses the expected repo dir [\#5059](https://github.com/chef/chef/pull/5059) ([thommay](https://github.com/thommay)) +- Expand data\_collector resource list to include all resources [\#5058](https://github.com/chef/chef/pull/5058) ([adamleff](https://github.com/adamleff)) +- Turn off fips with an empty environment var [\#5048](https://github.com/chef/chef/pull/5048) ([mwrock](https://github.com/mwrock)) +- Deprecate knife-supermarket gem [\#4896](https://github.com/chef/chef/pull/4896) ([thommay](https://github.com/thommay)) +- Update Nokogiri [\#5042](https://github.com/chef/chef/pull/5042) ([mwrock](https://github.com/mwrock)) +- Remote resource should respect sensitive flag [\#5025](https://github.com/chef/chef/pull/5025) ([PrajaktaPurohit](https://github.com/PrajaktaPurohit)) +- Convert the 3694 warning to a deprecation so it will be subject to the usual deprecation formatting \(collected at the bottom, can be made an error, etc\). [\#5022](https://github.com/chef/chef/pull/5022) ([coderanger](https://github.com/coderanger)) +- Deprecate `knife cookbook create` in favor of `chef generate cookbook`. [\#5021](https://github.com/chef/chef/pull/5021) ([tylercloke](https://github.com/tylercloke)) + +**Fixed Bugs:** + +- Fixes windows_package uninstall scenarios by calling uninstall string directly [\#5050](https://github.com/chef/chef/pull/5050) ([mwrock](https://github.com/mwrock)) +- Fix gem_package idempotency [\#5046](https://github.com/chef/chef/pull/5046) ([thommay](https://github.com/thommay)) +- Undefined local variable lookup in multiplexed_dir.rb [\#5027](https://github.com/chef/chef/issues/5027) ([robdimarco](https://github.com/robdimarco)) +- Correctly write out data collector metadata file [\#5019](https://github.com/chef/chef/pull/5019) ([adamleff](https://github.com/adamleff)) +- Eliminate missing constant errors for LWRP class [\#5000](https://github.com/chef/chef/pull/5000) ([PrajaktaPurohit](https://github.com/PrajaktaPurohit)) +- Updated_resource_count to data collector should only include updated resources [\#5006](https://github.com/chef/chef/pull/5006) ([adamleff](https://github.com/adamleff)) +- Don't mask directory deletion errors [\#4991](https://github.com/chef/chef/pull/4991) ([jaymzh](https://github.com/jaymzh)) + ## [v12.11.18](https://github.com/chef/chef/tree/v12.11.18) (2016-06-02) [Full Changelog](https://github.com/chef/chef/compare/v12.11.17...v12.11.18) diff --git a/Gemfile.lock b/Gemfile.lock index 812c5661d5..77244d0f88 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -17,9 +17,9 @@ GIT PATH remote: . specs: - chef (12.12.12) + chef (12.12.17) bundler (>= 1.10) - chef-config (= 12.12.12) + chef-config (= 12.12.17) chef-zero (~> 4.5) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -44,9 +44,9 @@ PATH specinfra (~> 2.10) syslog-logger (~> 1.6) uuidtools (~> 2.1.5) - chef (12.12.12-universal-mingw32) + chef (12.12.17-universal-mingw32) bundler (>= 1.10) - chef-config (= 12.12.12) + chef-config (= 12.12.17) chef-zero (~> 4.5) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -86,7 +86,7 @@ PATH PATH remote: chef-config specs: - chef-config (12.12.12) + chef-config (12.12.17) fuzzyurl (~> 0.8.0) mixlib-config (~> 2.0) mixlib-shellout (~> 2.0) @@ -99,12 +99,12 @@ GEM mixlib-cli (~> 1.4) artifactory (2.3.3) ast (2.3.0) - aws-sdk (2.3.18) - aws-sdk-resources (= 2.3.18) - aws-sdk-core (2.3.18) + aws-sdk (2.3.19) + aws-sdk-resources (= 2.3.19) + aws-sdk-core (2.3.19) jmespath (~> 1.0) - aws-sdk-resources (2.3.18) - aws-sdk-core (= 2.3.18) + aws-sdk-resources (2.3.19) + aws-sdk-core (= 2.3.19) aws-sdk-v1 (1.66.0) json (~> 1.4) nokogiri (>= 1.4.4) @@ -131,11 +131,11 @@ GEM ubuntu_ami (~> 0.4, >= 0.4.1) chef-rewind (0.0.9) chef-sugar (3.3.0) - chef-zero (4.6.2) + chef-zero (4.7.0) ffi-yajl (~> 2.2) hashie (>= 2.0, < 4.0) mixlib-log (~> 1.3) - rack + rack (< 2) uuidtools (~> 2.1) cheffish (2.0.4) chef-zero (~> 4.3) @@ -262,7 +262,7 @@ GEM rack (>= 1.2, < 3) octokit (4.3.0) sawyer (~> 0.7.0, >= 0.5.3) - ohai (8.17.0) + ohai (8.17.1) chef-config (>= 12.5.0.alpha.1, < 13) ffi (~> 1.9) ffi-yajl (~> 2.2) @@ -1 +1 @@ -12.12.12
\ No newline at end of file +12.12.17
\ No newline at end of file diff --git a/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb b/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb index d36909e8b3..c8bcd4ab77 100644 --- a/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb +++ b/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb @@ -46,6 +46,14 @@ module KitchenAcceptance "ARTIFACTORY_PASSWORD" => artifactory_password }.merge(new_resource.env)) end + ruby_block "copy_kitchen_logs_to_data_path" do + block do + suite = kitchen_dir.split("/").last + kitchen_log_path = ENV["WORKSPACE"] ? "#{ENV["WORKSPACE"]}/chef-acceptance-data/logs" : "#{kitchen_dir}/../.acceptance_data/logs/kitchen" + FileUtils.mkdir_p("#{kitchen_log_path}/#{suite}") + FileUtils.cp_r("#{kitchen_dir}/.kitchen/logs/", "#{kitchen_log_path}/#{suite}") + end + end end end end diff --git a/acceptance/Gemfile.lock b/acceptance/Gemfile.lock index 6abf73932f..6598e20c17 100644 --- a/acceptance/Gemfile.lock +++ b/acceptance/Gemfile.lock @@ -10,13 +10,13 @@ GEM remote: https://rubygems.org/ specs: addressable (2.4.0) - artifactory (2.3.2) - aws-sdk (2.3.14) - aws-sdk-resources (= 2.3.14) - aws-sdk-core (2.3.14) + artifactory (2.3.3) + aws-sdk (2.3.18) + aws-sdk-resources (= 2.3.18) + aws-sdk-core (2.3.18) jmespath (~> 1.0) - aws-sdk-resources (2.3.14) - aws-sdk-core (= 2.3.14) + aws-sdk-resources (2.3.18) + aws-sdk-core (= 2.3.18) berkshelf (4.3.5) addressable (~> 2.3, >= 2.3.4) berkshelf-api-client (~> 2.0, >= 2.0.2) @@ -60,11 +60,11 @@ GEM cleanroom (1.0.0) coderay (1.1.1) diff-lcs (1.2.5) - docker-api (1.28.0) + docker-api (1.29.0) excon (>= 0.38.0) json erubis (2.7.0) - excon (0.49.0) + excon (0.50.1) faraday (0.9.2) multipart-post (>= 1.2, < 3) ffi (1.9.10) @@ -112,7 +112,7 @@ GEM mixlib-authentication (1.4.1) mixlib-log mixlib-config (2.2.1) - mixlib-install (1.0.13) + mixlib-install (1.1.0) artifactory mixlib-shellout mixlib-versioning @@ -124,7 +124,7 @@ GEM multipart-post (2.0.0) net-scp (1.2.1) net-ssh (>= 2.6.5) - net-ssh (3.1.1) + net-ssh (3.2.0) nio4r (1.2.1) nori (2.6.0) octokit (4.3.0) @@ -180,7 +180,7 @@ GEM solve (2.0.3) molinillo (~> 0.4.2) semverse (~> 1.1) - test-kitchen (1.9.2) + test-kitchen (1.10.2) mixlib-install (~> 1.0, >= 1.0.4) mixlib-shellout (>= 1.2, < 3.0) net-scp (~> 1.1) @@ -190,7 +190,7 @@ GEM thor (0.19.1) timers (4.0.4) hitimes - train (0.13.1) + train (0.14.2) docker-api (~> 1.26) json (~> 1.8) mixlib-shellout (~> 2.0) @@ -211,7 +211,7 @@ GEM logging (>= 1.6.1, < 3.0) nori (~> 2.0) rubyntlm (~> 0.6.0) - winrm-fs (0.4.2) + winrm-fs (0.4.3) erubis (~> 2.7) logging (>= 1.6.1, < 3.0) rubyzip (~> 1.1) diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb index 094c8641a3..a194edc80e 100644 --- a/chef-config/lib/chef-config/config.rb +++ b/chef-config/lib/chef-config/config.rb @@ -132,8 +132,8 @@ module ChefConfig until File.directory?(PathHelper.join(path, "cookbooks")) || File.directory?(PathHelper.join(path, "cookbook_artifacts")) new_path = File.expand_path("..", path) if new_path == path - ChefConfig.logger.warn("No cookbooks directory found at or above current directory. Assuming #{Dir.pwd}.") - return Dir.pwd + ChefConfig.logger.warn("No cookbooks directory found at or above current directory. Assuming #{cwd}.") + return cwd end path = new_path end diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index 18afe3f405..11e545358d 100644 --- a/chef-config/lib/chef-config/version.rb +++ b/chef-config/lib/chef-config/version.rb @@ -21,7 +21,7 @@ module ChefConfig CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.12.12" + VERSION = "12.12.17" end # diff --git a/lib/chef/property.rb b/lib/chef/property.rb index 45ab4dd522..0589cb4c54 100644 --- a/lib/chef/property.rb +++ b/lib/chef/property.rb @@ -531,8 +531,6 @@ class Chef end end - protected - # # The options this Property will use for get/set behavior and validation. # @@ -583,6 +581,7 @@ class Chef (options.has_key?(:is) && resource.send(:_pv_is, { name => nil }, name, options[:is], raise_error: false)) end + # @api private def get_value(resource) if instance_variable_name resource.instance_variable_get(instance_variable_name) @@ -591,6 +590,7 @@ class Chef end end + # @api private def set_value(resource, value) if instance_variable_name resource.instance_variable_set(instance_variable_name, value) @@ -599,6 +599,7 @@ class Chef end end + # @api private def value_is_set?(resource) if instance_variable_name resource.instance_variable_defined?(instance_variable_name) @@ -607,6 +608,7 @@ class Chef end end + # @api private def reset_value(resource) if instance_variable_name if value_is_set?(resource) @@ -617,6 +619,8 @@ class Chef end end + private + def exec_in_resource(resource, proc, *args) if resource if proc.arity > args.size diff --git a/lib/chef/resource_builder.rb b/lib/chef/resource_builder.rb index d1f5c2e022..1641fe60f2 100644 --- a/lib/chef/resource_builder.rb +++ b/lib/chef/resource_builder.rb @@ -104,7 +104,11 @@ class Chef end def is_trivial_resource?(resource) - identicalish_resources?(resource_class.new(name, run_context), resource) + trivial_resource = resource_class.new(name, run_context) + # force un-lazy the name property on the created trivial resource + name_property = resource_class.properties.find { |sym, p| p.name_property? } + trivial_resource.send(name_property[0]) unless name_property.nil? + identicalish_resources?(trivial_resource, resource) end # this is an equality test specific to checking for 3694 cloning warnings diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 7fb713638d..34ad30d34d 100644 --- a/lib/chef/version.rb +++ b/lib/chef/version.rb @@ -21,7 +21,7 @@ class Chef CHEF_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.12.12" + VERSION = "12.12.17" end # diff --git a/spec/unit/recipe_spec.rb b/spec/unit/recipe_spec.rb index 70164f0a9b..3c30f96b20 100644 --- a/spec/unit/recipe_spec.rb +++ b/spec/unit/recipe_spec.rb @@ -266,6 +266,27 @@ describe Chef::Recipe do end end + class Coerced < Chef::Resource + resource_name :coerced + provides :coerced + default_action :whatever + property :package_name, [String, Array], coerce: proc { |x| [x].flatten }, name_property: true + def after_created + Array(action).each do |action| + run_action(action) + end + end + action :whatever do + package_name # unlazy the package_name + end + end + + it "does not emit 3694 when the name_property is unlazied by running it at compile_time" do + recipe.coerced "string" + expect(Chef).to_not receive(:log_deprecation) + recipe.coerced "string" + end + it "validating resources via build_resource" do expect {recipe.build_resource(:remote_file, "klopp") do source Chef::DelayedEvaluator.new { "http://chef.io" } |