-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Missing gem with ruby 3.1 #488
Comments
|
@bastelfreak Which ruby is Puppet 8 going to ship with? If ruby 3.1 or higher, maybe the AIO packages should vendor this gem?? |
|
Ruby 3.2 |
|
https://stdgems.org/ net-ftp is a stdlib gem. The ruby package in freebsd is supposed to vendor this (or at least have a dependency on it, but tha causes other issues. I'm fighting with this on Arch Linux). If Puppet creates the AIO packages properly, the gem will be vendored. I recommend raising a bug on the freebsd site. |
|
👋 @bastelfreak good catch! I saw there was a So this is a FreeBSD specific issue I think due to the way we package Ruby:
I wonder if we can try to lazy-load |
|
We tried really long on arch linux to ship each stdlib gem as own package. it's painful, it didn't work in the end and the ruby developers recommend vendoring the gems. I think that's the current goal for arch linux. |
|
Hey just checking if there's any movement on this? This is on Ubuntu |
|
@david22swan are you sure that's related? The error message is a different one. |
|
hmmm, maybe not I guess, had zeroed in on the |
|
Yet, the backtrace ends with: 🙄 @david22swan just to be sure, what happen when you add |
|
@smortex Adding the gem got my test's running green |
|
So as I understand it, Ruby 3.2 on GitHub Action does not include |
|
Fun: when net-ftp is not installed but you prevent this failure, the archive module use curl if it is available to download the file over FTP. I'll open a PR to not fail hard when the |
When net/ftp is not available, the archive module fail to load and the PuppetServer catalog compilation fail. While this gem is generally available because part of the Ruby standard library, some flavors of Ruby do noth ship with it by default, e.g. FreeBSD package of Ruby 3.2 or GitHub actions of Ruby 3.2. Because the archive module has multiple ways to download files, the absence of net/ftp is not necessarily an issue because when curl(1) is available, it is preferred over net/ftp. The catalog compilation error is therefore not required. Lazy load net/ftp when the pure-ruby download-over-FTP code is run, so that the absence of net/ftp cause a resource evaluation error on the agent side and the rest of the catalog still apply. Fixes #488
|
#491 should fix the issue |
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Just run the puppet agent, if the module puppet-archive are installed the agent would failed
What are you seeing
When the puppet agent run (well start) it failed with this message
The reason was find by @smortex (big thanks to him) is with ruby 3.1 the net-ftp become a gem (check https://www.ruby-lang.org/en/news/2021/12/25/ruby-3-1-0-released/) the module puppet-archive need this gem. So without this gem installed the agent cannot run
What behaviour did you expect instead
The module puppet-archive should installed the gem so don't need to installed manually on each client (and because puppet agent without puppet-archive don't need net-ftp)
The text was updated successfully, but these errors were encountered: