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

(CONT-19) Removal of puppet-module-gems #481

Merged
merged 3 commits into from
Oct 5, 2022

Conversation

david22swan
Copy link
Member

With the recent updates to bundler the need for a specific set off gems for each version of ruby that we support has been removed.
As such the logic behind our gems is now much simpler and can easily fit within the default templates, thus removing our need to have a separate module to manage them, with the templates already managing all other similar default requirements for our modules.

Copy link
Contributor

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I welcome this change.

config_defaults.yml Outdated Show resolved Hide resolved
config_defaults.yml Outdated Show resolved Hide resolved
config_defaults.yml Outdated Show resolved Hide resolved
config_defaults.yml Outdated Show resolved Hide resolved
@chelnak
Copy link
Contributor

chelnak commented Oct 4, 2022

I welcome this change.

I'm really excited about this. 🥳

@david22swan david22swan force-pushed the cont-19/remove_puppet-module-gems branch from 5e5ca84 to 5a0ca4a Compare October 4, 2022 14:41
config_defaults.yml Outdated Show resolved Hide resolved
config_defaults.yml Outdated Show resolved Hide resolved
With the recent updates to bundler the need for a specific set of gems for each version of ruby that we support has been removed.
As such the logic behind our gems is now much simpler and can easily fit within the default templates, thus removing our need to have a separate module to manage them, with the templates already managing all other similar default requirements for our modules.
Prior to this change only a single version requirement could be passed through to the code.
With this however we can now spec specify multiple, allowing us a much more exact control of our Gems
@david22swan david22swan force-pushed the cont-19/remove_puppet-module-gems branch 2 times, most recently from 4cec4a5 to 92d2772 Compare October 4, 2022 16:46
config_defaults.yml Outdated Show resolved Hide resolved
config_defaults.yml Outdated Show resolved Hide resolved
@david22swan david22swan force-pushed the cont-19/remove_puppet-module-gems branch 2 times, most recently from 417d34b to 4028ebc Compare October 5, 2022 10:35
Copy link
Contributor

@chelnak chelnak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is amazing!!!

Just one small query from me.

chelnak
chelnak previously approved these changes Oct 5, 2022
config_defaults.yml Outdated Show resolved Hide resolved
config_defaults.yml Outdated Show resolved Hide resolved
config_defaults.yml Outdated Show resolved Hide resolved
ekohl
ekohl previously approved these changes Oct 5, 2022
Copy link
Contributor

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 on most of it. This code is now unused:

ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')

version: '~> 1.0'
- gem: 'rubocop'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a hint: rubocop-rake also exists.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the ruby version stuff.
As to rubocop, think that belongs in it's own bit of work for when we next move the pins.

- Added Rubocop gems missing from original commit
- Add lower bounds to all gems
- Remove `puppet-lint` as it is brought in by `voxpupuli-puppet-lint-plugins`
- Remove `specinfra` as it is brought in by `serverspec`
- Move `serverspec` to system_tests
- Remove `ed25519` and `bcrypt_pbkf` as they are brought in by `net-ssh`
- Remove `rspec-puppet` as it is brought in by `puppetlabs_spec_helper`
- Pin `facterdb` to 1.18 and up as this is the version which adds Ub22.04
- Remove code previously used to retrieve ruby version
@chelnak chelnak merged commit d0490b9 into main Oct 5, 2022
@chelnak chelnak deleted the cont-19/remove_puppet-module-gems branch October 5, 2022 13:47
@alexjfisher
Copy link
Contributor

FWIW, users accessing rubygems via an Artifactory repository will want to read about this feature https://www.jfrog.com/confluence/display/JFROG/RubyGems+Repositories#RubyGemsRepositories-RetrievingLatestRubyGemsPackageCompatiblewithYourRubyVersions introduced in Artifactory 7.15.3

We're not running this version yet and in recent months have had to modify our pdk-templates fork to pin more and more gems that were no longer supporting older rubies and no longer being pinned through updates to puppet-module-gems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants