Skip to content

Conversation

@nmburgan
Copy link
Member

@nmburgan nmburgan commented Dec 14, 2025

Unless we have a good reason to, we don't want to include default gems in ones that we ship. It's hacky to replace the version shipped with the Ruby version, could potentially result in breakage, and we should only do it to address a CVE that has not yet been addressed by a new Ruby version. Most of the time, it doesn't matter too much if a newer version coexists with the default version, but you end up with warnings in run logs where a gem has a loose dependency that could include either version.

We also don't really need to update bundled gems unless we have to for the same reasons.

This updates the update_gems automation to ignore any dependencies that are default or bundled gems, since we don't want to include them here. This also removes all of the default gems that we were including before. The one exception is the URI gem, where the version shipped in Ruby 3.2.9 has a CVE. To provide this without the warnings showing up, we remove the default uri gem's gemspec file.

For bundled gems, this removes prime, but keeps rexml, since this one currently has CVEs and often needs updating for this reason.

When we are providing a newer version of a default gem than the one that Ruby ships with, in order to avoid warnings about multiple gem versions being available, we have to remove the gemspec for the older version. Generally, we don't need to ship our own version of a default gem unless it has a CVE and Ruby has not yet fixed it.
Unless we have a good reason to, we don't want to include default gems in ones that we ship. It's hacky to replace the version shipped with the Ruby version, and we should only do it to address a CVE that has not yet been addressed by a new Ruby version.
Component updates:
- rubygem-aws-partitions: version 1.1190.0 -> 1.1194.0
- rubygem-aws-sdk-ec2: version 1.583.0 -> 1.584.0
- rubygem-concurrent-ruby: version 1.3.5 -> 1.3.6
- rubygem-date: version 3.5.0 -> 3.5.1
- rubygem-io-console: version 0.8.1 -> 0.8.2
- rubygem-json: version 2.17.1 -> 2.18.0
- rubygem-puppet_forge: version 6.0.0 -> 6.1.0
We shouldn't include these unless we have a very good reason to, like addressing a CVE before Ruby has shipped a new version.
This is a default gem, and Ruby 3.2.9 ships 0.12.4. Version 0.12.5 addresses a CVE, so we ship this version until Ruby 3.2.10 is released which should include it.
There's not really a good reason to update the bundled gems either, unless they have a CVE. This adds them to the list, and the only bundled gem we keep around is rexml, since it currently and often has CVEs.
@nmburgan nmburgan changed the title Don't update default gems unless we really have to Don't update default or bundled gems unless we really have to Dec 15, 2025
The version bundled is too old for modern faraday-net_http
puppet_forge requires >= 0.2 and Ruby 3.2.9 has 0.1.
Component updates:
- rubygem-aws-sdk-ec2: version 1.583.0 -> 1.585.0
- rubygem-openfact: version 5.2.0 -> 5.2.1
- rubygem-openvox: version 8.24.1 -> 8.24.2
Because we now defensively always try to uninstall old versions, we don't want to confuse people by showing the 'Gem not installed' message if there are no older versions.
@nmburgan nmburgan merged commit df99684 into main Dec 15, 2025
4 checks passed
@nmburgan nmburgan deleted the default_gem_fix branch December 15, 2025 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants