librarian-puppet icon indicating copy to clipboard operation
librarian-puppet copied to clipboard

Deprecation notice regarding CompositeIO

Open hackdna opened this issue 2 years ago • 5 comments

Ubuntu 20.04 LTS

Install librarian-puppet using Ruby that comes with Puppet 7 (ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [x86_64-linux]):

/opt/puppetlabs/puppet/bin/gem install librarian-puppet -v 3.0.1 --no-document

Run /opt/puppetlabs/puppet/bin/librarian-puppet

The following message is added at the top of any output:

Top level ::CompositeIO is deprecated, require 'multipart/post' and use `Multipart::Post::CompositeReadIO` instead!
Top level ::Parts is deprecated, require 'multipart/post' and use `Multipart::Post::Parts` instead!

hackdna avatar Jun 06 '22 14:06 hackdna

The following message is added at the top of any output:

A full stack trace is generally speaking more useful. Now it's really guess work. Luckily, I saw it somewhere else which gives me a general idea.

I think this comes from the faraday gem, which is pulled in via puppet_forge gem. There is a PR to add support for Faraday 2 which probably solves the deprecation warning. It'd be best to focus the efforts there.

ekohl avatar Jun 09 '22 12:06 ekohl

Thank you for looking into this. The deprecation message is the only additional output I've received. How can I obtain a full stack trace?

hackdna avatar Jun 09 '22 13:06 hackdna

Odd because in https://github.com/voxpupuli/modulesync_config/issues/784 I saw it also report the file location.

ekohl avatar Jun 09 '22 14:06 ekohl

Here's a full sample output:

# /opt/puppetlabs/puppet/bin/librarian-puppet
Top level ::CompositeIO is deprecated, require 'multipart/post' and use `Multipart::Post::CompositeReadIO` instead!
Top level ::Parts is deprecated, require 'multipart/post' and use `Multipart::Post::Parts` instead!
Commands:
  librarian-puppet clean           # Cleans out the cache and install paths.
  librarian-puppet config          # Show or edit the config.
  librarian-puppet help [COMMAND]  # Describe available commands or one specific command
  librarian-puppet init            # Initializes the current directory.
  librarian-puppet install         # Resolves and installs all of the dependencies you specify.
  librarian-puppet outdated        # Lists outdated dependencies.
  librarian-puppet package         # Cache the puppet modules in vendor/puppet/cache.
  librarian-puppet show            # Shows dependencies
  librarian-puppet update          # Updates and installs the dependencies you specify.
  librarian-puppet version         # Displays the version.

hackdna avatar Jun 09 '22 14:06 hackdna

Also, installation is broken with Puppet 6:

2022/06/09 17:27:52 GCEMetadataScripts: startup-script: + /opt/puppetlabs/puppet/bin/gem install librarian-puppet -v 3.0.1 --no-document
2022/06/09 17:27:53 GCEMetadataScripts: startup-script: ERROR:  Error installing librarian-puppet:
2022/06/09 17:27:53 GCEMetadataScripts: startup-script: #011The last version of multipart-post (< 3, >= 1.2) to support your Ruby & RubyGems was 2.2.0. Try installing it with `gem install multipart-post -v 2.2.0` and then running the current command again
2022/06/09 17:27:53 GCEMetadataScripts: startup-script: #011multipart-post requires Ruby version >= 2.6.0. The current ruby version is 2.5.0.

hackdna avatar Jun 09 '22 19:06 hackdna