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

Ruby 3 support #166

Open
albertvaka opened this issue Sep 16, 2021 · 6 comments
Open

Ruby 3 support #166

albertvaka opened this issue Sep 16, 2021 · 6 comments

Comments

@albertvaka
Copy link

I realized there's no puppet-module-posix-default-r3.0 package on rubygems.

Is Ruby 3 not supported?

@bastelfreak
Copy link

bastelfreak commented Sep 16, 2021

https://tickets.puppetlabs.com/browse/MODULES-11161 sadly puppet doesn't care that much about supporting modern rubies / enabling people to at lease use it. This is an ongoing issue since years and repeats with every Ruby release (the next one is in 3 months)

@bastelfreak
Copy link

Hey puppet, would it be possible that some of you could take a look at this?

@da-ar da-ar self-assigned this Nov 15, 2021
mleiner added a commit to noris-network/puppet-exim that referenced this issue May 12, 2022
In the past, I used vagrant -> libvirt to run acceptance test, but
after upgrading the worksration to Ubuntu 22.04 LTS (jammy), this stopped
working because of incompatibilities.

Tests are run using pdk bundle exec rake ... and this uses the pdk
environment with ruby 2.7.x, while my operating system (and thus vagrant)
have been ported to ruby 3. This creates confusion within the tools, because
the Gemfile (from PDK) depends on modules that depend on the ruby version in
their name (puppet-module-posix-...-r3.0). After days of debugging and
finding seemingly inactive issues on github and jira, I decided that I do not
want to waste even more time on this.

I like docker as much or less as vagrant (not much) and converted all litmus
tests to use docker.

Docker itself breaks on Ubuntu 22.04 LTS in unprivileged mode, too. Luckily,
from my experience with Gentoo, I already suspected trouble with cgroups.
Since systemd 248 (no likey either) something changed in the cgroup handling
which causes containers using systemd to fail under further conditions. As
much as I understand the discussion, systemd devs expect the container people
to change their containers or container infrastructure to their ideas.
I don't want to investigate this any deeper.

The solution for using unprivileged docker on Ubuntu 22.04 LTS?
Add "systemd.unified_cgroup_hierarchy=0" to your kernel cmdline.

References for the ruby3 issues:
puppetlabs/puppet-module-gems#166
=> https://tickets.puppetlabs.com/browse/MODULES-11161

References for the docker/systemd/ubuntu22 issue:
moby/moby#42275
@da-ar da-ar removed their assignment Jun 22, 2022
netgate-git-updates pushed a commit to pfsense/FreeBSD-ports that referenced this issue Jun 29, 2022
While here, mark broken with "modern" Ruby because it use some legacy
Ruby syntax but when corrected still fails with nonexistent dependencies:
puppetlabs/puppet-module-gems#166

With hat:	puppet
@smortex
Copy link

smortex commented Jun 29, 2022

I realized there's no puppet-module-posix-default-r3.0 package on rubygems.

Nor puppet-module-posix-default-r3.1 :trollface:

More seriously we (FreeBSD community) are interested in seeing some progress in respect to this now that we ship Ruby 3.0 by default. I just had to mark the PDK as broken with Ruby 3.0/3.1 because the code does not work with Ruby 3.0+ (trivial fix) and the generated code depend on gems that do not exit (this PR 😉).

ocochard pushed a commit to ocochard/freebsd-ports that referenced this issue Jul 6, 2022
While here, mark broken with "modern" Ruby because it use some legacy
Ruby syntax but when corrected still fails with nonexistent dependencies:
puppetlabs/puppet-module-gems#166

With hat:	puppet
@pingram3030
Copy link

Ruby 2.6 is EOL and 2.7 is in security maintenance only with an alleged EOL of 7 months from now. Only 3.x is being supported by Ruby, so we need ruby 3.x versions of all gems this repo creates a.s.a.p.

@bastelfreak
Copy link

I already mentioned it in https://tickets.puppetlabs.com/browse/MODULES-11161. I think the whole idea of hardcoding the ruby version in the gem name is obsolute. Instead of continuing this for Ruby 3.0 and 3.1, I suggest to drop the whole idea and create the gems without the ruby versions.

@pmcmaw
Copy link
Contributor

pmcmaw commented Jun 7, 2023

Hey everyone! This is something the team decided to not go ahead with.

In order to move forward and make use of Puppet 8 with Ruby 3 it is advised that you move away and no longer use puppet-module-gems.

This blog post provides information on how to do this: https://puppetlabs.github.io/content-and-tooling-team/blog/posts/2023-01-10-remove-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

No branches or pull requests

7 participants