puppetlabs / r10k

Smarter Puppet deployment
Other
800 stars 353 forks source link

uninitialized constant R10K::Logging #1223

Closed HerveMARTIN closed 2 years ago

HerveMARTIN commented 2 years ago

Describe the Bug

A bug appear since the 3.12.0 release

+ bundle exec rake r10k:syntax
`/` is not writable.
Bundler will use `/tmp/bundler/home/unknown' as your home directory temporarily.
rake aborted!
NameError: uninitialized constant R10K::Logging
/home/jenkins/workspace/IT_it_puppet5_confjenkins/vendor/bundle/ruby/2.6.0/gems/r10k-3.12.0/lib/r10k/util/setopts.rb:12:in`<module:Setopts>'
/home/jenkins/workspace/IT_it_puppet5_confjenkins/vendor/bundle/ruby/2.6.0/gems/r10k-3.12.0/lib/r10k/util/setopts.rb:8:in`<module:Util>'
/home/jenkins/workspace/IT_it_puppet5_confjenkins/vendor/bundle/ruby/2.6.0/gems/r10k-3.12.0/lib/r10k/util/setopts.rb:2:in`<module:R10K>'
/home/jenkins/workspace/IT_it_puppet5_confjenkins/vendor/bundle/ruby/2.6.0/gems/r10k-3.12.0/lib/r10k/util/setopts.rb:1:in `<top(required)>'
/home/jenkins/workspace/IT_it_puppet5_confjenkins/vendor/bundle/ruby/2.6.0/gems/r10k-3.12.0/lib/r10k/action/base.rb:1:in`require'
/home/jenkins/workspace/IT_it_puppet5_confjenkins/vendor/bundle/ruby/2.6.0/gems/r10k-3.12.0/lib/r10k/action/base.rb:1:in`<top (required)>'
/home/jenkins/workspace/IT_it_puppet5_confjenkins/vendor/bundle/ruby/2.6.0/gems/r10k3.12.0/lib/r10k/action/puppetfile/check.rb:1:in `require'
/home/jenkins/workspace/IT_it_puppet5_confjenkins/vendor/bundle/ruby/2.6.0/gems/r10k3.12.0/lib/r10k/action/puppetfile/check.rb:1:in `<top (required)>'
/home/jenkins/workspace/IT_it_puppet5_confjenkins/vendor/bundle/ruby/2.6.0/gems/ra10ke-0.5.0/lib/ra10ke.rb:81:in `require'
/home/jenkins/workspace/IT_it_puppet5_confjenkins/vendor/bundle/ruby/2.6.0/gems/ra10ke-0.5.0/lib/ra10ke.rb:81:in `block (2levels) in initialize'
/home/jenkins/workspace/IT_it_puppet5_confjenkins/vendor/bundle/ruby/2.6.0/gems/rake-13.0.6/exe/rake:27:in `<top(required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => r10k:syntax
(See full trace by running task with --trace)

This stack disappear when forcing previous version (3.10.0 tested).

Expected Behavior

Check syntax without error

Steps to Reproduce

Steps to reproduce the behavior:

  1. Prepare env :

    + bundle install --path vendor/bundle
    `/` is not writable.
    Bundler will use `/tmp/bundler/home/unknown' as your home directory temporarily.
    Fetching gem metadata from https://rubygems.org/........
    Fetching gem metadata from https://rubygems.org/.
    Resolving dependencies...
    Using rake 13.0.6
    Using public_suffix 4.0.6
    Using addressable 2.8.0
    Using bundler 1.17.2
    Using colored2 3.1.2
    Using cri 2.15.10
    Using diff-lcs 1.4.4
    Using facter 2.5.7
    Using multipart-post 2.1.1
    Using faraday 0.17.4
    Using faraday_middleware 0.14.0
    Using fast_gettext 1.1.2
    Using locale 2.1.3
    Using text 1.3.1
    Using gettext 3.2.9
    Using gettext-setup 0.34
    Using rchardet 1.8.0
    Using git 1.9.1
    Using hiera 3.7.0
    Using json 2.5.1
    Using json-schema 2.8.1
    Using jwt 2.2.3
    Using log4r 1.1.10
    Using spdx-licenses 1.3.0
    Using metadata-json-lint 3.0.1
    Using minitar 0.9
    Using mocha 1.13.0
    Using molinillo 0.8.0
    Using multi_json 1.15.0
    Using pathspec 1.0.0
    Using puppet 5.3.5
    Using puppet-lint 2.5.2
    Using puppet-lint-absolute_classname-check 3.0.1
    Using puppet-lint-empty_string-check 0.2.2
    Using puppet-lint-file_ensure-check 1.0.0
    Using puppet-lint-leading_zero-check 1.0.0
    Using puppet-lint-spaceship_operator_without_tag-check 0.1.1
    Using puppet-lint-strict_indent-check 2.0.8
    Using puppet-lint-trailing_comma-check 0.4.2
    Using puppet-lint-undef_in_function-check 0.2.1
    Using puppet-lint-unquoted_string-check 2.1.0
    Using puppet-lint-variable_contains_upcase 1.2.0
    Using puppet-syntax 3.1.0
    Using semantic_puppet 1.0.4
    Using puppet_forge 2.3.4
    Using rspec-support 3.10.2
    Using rspec-core 3.10.1
    Using rspec-expectations 3.10.1
    Using rspec-mocks 3.10.2
    Using rspec 3.10.0
    Using rspec-puppet 2.10.0
    Using puppetlabs_spec_helper 4.0.1
    Using r10k 3.12.0
    Using semverse 2.0.0
    Using solve 4.0.4
    Using ra10ke 0.5.0
    Bundle complete! 18 Gemfile dependencies, 56 gems now installed.
    Bundled gems are installed into `./vendor/bundle`
  2. Launch rake r10k:syntax

    bundle exec rake r10k:syntax

Environment

Additional Context

justinstoller commented 2 years ago

Thanks for the bug report, I've opened https://github.com/puppetlabs/r10k/pull/1225 as a hopeful solution and we'll try to get that out ASAP.