Skip to content
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

undefined method `full' for Chef::Resource::HomebrewTap #155

Closed
mjmerin opened this issue Dec 22, 2021 · 3 comments
Closed

undefined method `full' for Chef::Resource::HomebrewTap #155

mjmerin opened this issue Dec 22, 2021 · 3 comments

Comments

@mjmerin
Copy link

mjmerin commented Dec 22, 2021

πŸ—£οΈ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

πŸ‘» Brief Description

A clear and concise description of what the bug is.

When using the homebrew_tap resource we get the following error

         * homebrew_tap[chef/chef] action tap
           
           ================================================================================
           Error executing action `tap` on resource 'homebrew_tap[chef/chef]'
           ================================================================================
           
           NoMethodError
           -------------
           undefined method `full' for Chef::Resource::HomebrewTap
           
           Resource Declaration:
           ---------------------
           # In /Users/Shared/kitchen/cache/cookbooks/lab_build/recipes/chef_environment.rb

I've also tried executing the install_taps recipe and get the following similar errors

       Recipe: homebrew::install_taps
         * homebrew_tap[chef/chef] action tap
           
           ================================================================================
           Error executing action `tap` on resource 'homebrew_tap[chef/chef]'
           ================================================================================
           
           NoMethodError
           -------------
           undefined method `full' for Chef::Resource::HomebrewTap

πŸ₯ž Cookbook version

Version of the cookbook where you are encountering the issue.

5.3.0

πŸ‘©β€πŸ³ Chef-Infra Version

Tested on

21.12.720 and 21.9.613

🎩 Platform details

macOS 10.15.7 Catalina

Steps To Reproduce

Steps to reproduce the behavior:

kitchen converge a recipe using homebrew_tap such as

homebrew_tap `chef/chef`

πŸš“ Expected behavior

Expected tap to work

βž• Additional context

--full does not seem to be an option in homebrew's documentation anymore: https://docs.brew.sh/Taps

When trying to execute it we get the following:

brew tap --full chef/chef
Error: Calling the --full switch is disabled! There is no replacement.

Associated Homebrew PRs where this was removed:
Homebrew/brew#11337
Homebrew/brew#11328

@jweyer8
Copy link

jweyer8 commented Dec 27, 2021

      System Info:
       ------------
       chef_version=17.9.18
       platform=mac_os_x
       platform_version=10.15.7
       ruby=ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-darwin19]
       program_name=/opt/chef/bin/chef-client
       executable=/opt/chef/bin/chef-client
       
   
   Running handlers:
   [2021-12-27T11:39:31-08:00] ERROR: Running exception handlers
   Running handlers complete
   [2021-12-27T11:39:31-08:00] ERROR: Exception handlers complete
   Infra Phase failed. 105 resources updated in 03 minutes 41 seconds
   [2021-12-27T11:39:31-08:00] FATAL: Stacktrace dumped to /Users/Shared/kitchen/cache/chef-stacktrace.out
   [2021-12-27T11:39:31-08:00] FATAL: ---------------------------------------------------------------------------------------
   [2021-12-27T11:39:31-08:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
   [2021-12-27T11:39:31-08:00] FATAL: ---------------------------------------------------------------------------------------
   [2021-12-27T11:39:31-08:00] FATAL: NoMethodError: homebrew_tap[chef/chef] (lab_build::chef_environment line 35) had an error: NoMethodError: undefined method `full' for Chef::Resource::HomebrewTap

@chadjiang
Copy link

chadjiang commented Dec 28, 2021

I modified /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/chef-17.9.18/lib/chef/resource/homebrew_tap.rb in the node.
removed #{new_resource.full ? "--full" : ""}, then it works.

https://github.com/chef/chef/blob/main/CHANGELOG.md#v17918-2021-12-23
"Remove the full option from homebrew_tap #12346 (damacus)"

@chadjiang
Copy link

looks chef side already merged fix. chef/chef#12418

@damacus damacus closed this as completed Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants