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

Limit beaker-puppet to older Rubies #75

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

mhashizume
Copy link
Contributor

No version of beaker-puppet is compatible with Ruby >= 3.2 because of taint functions. Because beaker-puppet specifies that it cannot run on Ruby < 3.1 in its gemspec, when you run bundle install on newer Rubies- even when excluding the Gem group to which beaker-puppet belongs- Bundler errors.

This commit updates the Gemfile to only list beaker-puppet if Ruby is less than 3.1.0.

@mhashizume mhashizume requested a review from a team as a code owner February 26, 2024 18:28
@mhashizume
Copy link
Contributor Author

This issue surfaced because the release prep action for this module, which is running on Ruby 3.2, failed: https://github.com/puppetlabs/puppetlabs-augeas_core/actions/runs/8052884890

We can see this behavior in main:

$ ruby -v
ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [arm64-darwin23]
$ git describe
1.1.2-77-g433594e
$ export BUNDLE_ONLY=release_prep
$ bundle install
. . .
Could not find compatible versions

Because beaker-puppet >= 3.0.0 depends on Ruby >= 2.7, < 3.2
  and Gemfile depends on beaker-puppet ~> 3.0,
  Ruby >= 2.7, < 3.2 is required.
So, because current Ruby version is = 3.2.3,
  version solving has failed.

And it behaving as expected with this PR:

$ ruby -v
ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [arm64-darwin23]
$ git describe
1.1.2-78-gd9b280e
$ export BUNDLE_ONLY=release_prep
$ bundle install
. . . 
Bundle complete! 31 Gemfile dependencies, 31 gems now installed.
Gems in the groups 'development' and 'system_tests' were not installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

@mhashizume mhashizume added the maintenance Maintenance chores are typically excluded from changelogs label Feb 26, 2024
No version of beaker-puppet is compatible with Ruby >= 3.2 because of
taint functions. Because beaker-puppet specifies that it cannot run on
Ruby > 3.1 in its gemspec, when you run bundle install on newer Rubies-
even when excluding the Gem group to which beaker-puppet belongs-
Bundler errors.

This commit updates the Gemfile to only list beaker-puppet if Ruby is
less than 3.1.0.
@mhashizume mhashizume merged commit 039c68e into puppetlabs:main Feb 26, 2024
14 checks passed
@mhashizume mhashizume deleted the beaker-puppet-ruby branch February 27, 2024 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance chores are typically excluded from changelogs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants