Uploaded image for project: 'Puppet Development Kit'
  1. Puppet Development Kit
  2. PDK-1187

PDK Does not handle bundle paths as expected

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDK 1.8.0
    • Component/s: None
    • Template:
    • Acceptance Criteria:
      Hide

      After installing the pdk gem via bundler, the pdk commands should look in the bundle path specified by bundle\config for gems. It should also not re write that config file, breaking other bundle commands.

      Show
      After installing the pdk gem via bundler, the pdk commands should look in the bundle path specified by bundle\config for gems. It should also not re write that config file, breaking other bundle commands.
    • Team:
      Puppet Developer Experience
    • Method Found:
      Inspection
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      When running PDK from a gem install, PDK will no longer override an existing user specified bundler gem install path. This allows PDK in bundler setups (eg {{bundl e exec pdk validate}}) to work correctly.
    • QA Risk Assessment:
      Needs Assessment

      Description

      When the `bundle install --path .bundle\gems` command is run for a PDKified module, the pdk gem is installed in that path.

      If a user then runs a command likeĀ `bundle exec pdk build` the pdk gem does not appear to respect the bundle path. It will attempt to look in a self determined path for gems. When it does not find the gems, it will overwrite the bundle\config file to point to the path it had looked in and found nothing. This means that subsequent non-pdk commands like `bundle exec puppet --version` will also fail.

      The only way to get bundle to work properly again is to execute `bundle install --path .bundle\gems` again. It will find all the gems where they should be and re write the bundle\config file.

      The only way I have found to get pdk gem commands to work is to deliberately set the bundle path on install manually to the path the pdk expects to find gems.

      The error and the path where pdk is looking for gems are in the error snippet below.

      pdk (INFO): Building puppetlabs-windows version 5.0.0
      C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/spec_set.rb:91:in `block in materialize': Could not find rake-12.3.1 in any of the sources (Bundler::GemNotFound)
              from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/spec_set.rb:85:in `map!'
              from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/spec_set.rb:85:in `materialize'
              from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/definition.rb:171:in `specs'
              from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/definition.rb:238:in `specs_for'
              from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/definition.rb:227:in `requested_specs'
              from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:108:in `block in definition_method'
              from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:20:in `setup'
              from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler.rb:107:in `setup'
              from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/bundler/setup.rb:20:in `<top (required)>'
              from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:59:in `require'
              from C:/tools/Ruby24/ruby24/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:59:in `require'
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  tim.sharpe Tim Sharpe
                  Reporter:
                  william.hurt William Hurt
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: