Automatic Upgrades to ruby-build cannot see new Ruby definitions
:speaking_head: 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.
:ghost: Brief Description
When a new release of ruby-build is released, this cookbook helpfully updates the ruby-build git repo in /var/cinc/cache, but when ruby_build_definition goes to run, it cannot see newly released versions of Ruby.
:pancakes: Cookbook version
2.2.2
:woman_cook: Chef-Infra Version
Cinc-Client 16.18.0
:tophat: Platform details
Ubuntu 20.04
Steps To Reproduce
Steps to reproduce the behavior:
- Have an existing server utilizing the ruby_build cookbook and a previous version of the ruby-build software installed.
- Create recipe with the following:
ruby_build_install
ruby_build_definition '3.1.2'
- Chef Client runs, updates ruby-build, attempts to install Ruby 3.1.2 (which was new as of the updated version of ruby-build).
Fails with 'cannot find definition for 3.1.2'
:police_car: Expected behavior
Ruby 3.1.2 is installed successfully.
:heavy_plus_sign: Additional context
I believe that because of the not_if here, the install.sh script is not run when the cached ruby-build git repository gets upgraded, which keeps /usr/local/bin/ruby-build from being updated. This keeps it from seeing the new definitions.