Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7433

Restructure Gemfile to use different group names

    Details

    • Type: Task
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 6.0.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide

      See details in description.

      Show
      See details in description.
    • Team:
      Coremunity
    • Story Points:
      2
    • Sprint:
      Platform Core KANBAN
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Restructure puppet's Gemfile so that bundler installs puppet's runtime, feature-related, and test dependencies by default. The development and documentation groups can be installed using: bundle install --with development documentation.
    • QA Risk Assessment:
      Needs Assessment

      Description

      As part of PUP-7425, the Puppet Gemfile and .gemspec have been refactored to properly support a Bundler workflow that consumes the Puppet gem via a git reference.

      During that refactor it was observed that the Puppet Gemfile uses gem groups in a slightly strange way, probably due to organic growth over the years.

      rake is clearly a development dependency in the rubygems sense (as are rspec and mocha) but in the Puppet Gemfile they are present in both the development and test group. Presumably they are in the test group as a result of TravisCI and AppVeyor performing a bundle install --without development extra - rake / rspec are needed for those environments, but would be excluded by that Bundler invocation.

      So the suggestion is to do the following:

      • Move actual hard development dependencies like rake, rspec and mocha to add_development_dependency declarations within the .gemspec
      • For development dependencies that are not necessary for basic test running in TravisCI / AppVeyor, move them to the extra group (or create a group of a new name that is more clear like debug) - gems such as pry belong here
      • Remove the test gemset group as its confusing and unnecessary
      • For any left-over gems that are conditional development dependencies (based on platform), leave them in Gemfile as well - make a decision about which gemset to put them in - if they're not necessary for test-running, move them to extra or whatever the other gemset is named
      • Update the appveyor.yml and .travis.yml so that they perform a bundle install --without extra debug ... noting that development should be installed
      • Update any relevant README.md or similar files in the Puppet repo
      • Update ci-job-configs where necessary to remove development as an excluded gemset

      Another observation is that there are 3 separate locations for expressing gem dependencies (depending on workflow) and they all disagree with one another - that ticket has been filed as a separate effort - PA-1077

      • puppet-agent packages

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  josh Josh Cooper
                  Reporter:
                  ethan Ethan Brown
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: