poise / application_ruby

Development repository for Opscode Cookbook application_ruby
Apache License 2.0
124 stars 153 forks source link

Chef 14 Support #98

Open petracvv opened 6 years ago

petracvv commented 6 years ago

I am preparing for migrating to Chef 14 and am running into issues running this cookbook with that Chef client version. In particular, I am getting this traceback when the recipe compiles:

 NameError
         ---------
         instance variable @cwd not defined

         Cookbook Trace:
         ---------------
           /tmp/kitchen/cache/cookbooks/application_ruby/files/halite_gem/poise_application_ruby/resources/ruby_execute.rb:43:in `remove_instance_variable'
           /tmp/kitchen/cache/cookbooks/application_ruby/files/halite_gem/poise_application_ruby/resources/ruby_execute.rb:43:in `initialize'
           /tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/subresources/container.rb:140:in `block in declare_resource'
           /tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/subresources/container.rb:121:in `declare_resource'
           /tmp/kitchen/cache/cookbooks/application/files/halite_gem/poise_application/resources/application.rb:175:in `public_send'
           /tmp/kitchen/cache/cookbooks/application/files/halite_gem/poise_application/resources/application.rb:175:in `block (2 levels) in _rewire_dsl!'
           /tmp/kitchen/cache/cookbooks/my-redmine/recipes/default.rb:95:in `block in from_file'
           /tmp/kitchen/cache/cookbooks/my-redmine/recipes/default.rb:57:in `from_file'

         Relevant File Content:
         ----------------------
         /tmp/kitchen/cache/cookbooks/application_ruby/files/halite_gem/poise_application_ruby/resources/ruby_execute.rb:

          36:        class Resource < PoiseRuby::Resources::RubyExecute::Resource
          37:          include PoiseApplicationRuby::AppMixin
          38:          provides(:application_ruby_execute)
          39:
          40:          def initialize(*args)
          41:            super
          42:            # Clear some instance variables so my defaults work.
          43>>           remove_instance_variable(:@cwd)
          44:            remove_instance_variable(:@group)
          45:            remove_instance_variable(:@user)
          46:          end
          47:
          48:          # #!attribute cwd
          49:          #   Override the default directory to be the app path if unspecified.
          50:          #   @return [String]
          51:          attribute(:cwd, kind_of: [String, NilClass, FalseClass], default: lazy { parent && parent.path })
          52:

         System Info:
         ------------
         chef_version=14.6.47
         platform=centos
         platform_version=7.5.1804
         ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
         program_name=/opt/chef/bin/chef-client
         executable=/opt/chef/bin/chef-client

Is Chef 14 support in the works already for the poise application family of cookbooks?

em77 commented 5 years ago

@petracvv Did you find a workaround for this?

petracvv commented 5 years ago

@em77 Not really. Based on discussions I've seen on the Chef Slack channel the poise maintainer doesn't have the time, support, etc to properly support the poise set of cookbooks. We've been looking at moving away from poise altogether.

coderanger commented 5 years ago

What @petracvv said.