[SRU] vagrant spits out ruby deprecation warnings on every call
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vagrant (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Focal |
Fix Released
|
Low
|
Unassigned |
Bug Description
[Impact]
This issue is not critical but I believe it degrades a lot the user experience in a brand new LTS release. Every time one calls vagrant via CLI, Ruby 2.7 throws a bunch of warnings about some deprecated features, which for some (inexperienced?) users might seem a failure in a first look.
This was reported not just here as a bug report but also in Discourse:
https:/
[Test Case]
In a Focal LXD container:
$ apt install vagrant
$ vagrant
NOTE: Gem::Specificat
Gem::Specificat
/usr/share/
/usr/share/
(eval):3: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/
Usage: vagrant [options] <command> [<args>]
-v, --version Print the version and exit.
-h, --help Print this help.
Common commands:
box manages boxes: installation, removal, etc.
cloud manages everything related to Vagrant Cloud
destroy stops and deletes all traces of the vagrant machine
global-status outputs status Vagrant environments for this user
halt stops the vagrant machine
help shows the help for a subcommand
init initializes a new Vagrant environment by creating a Vagrantfile
login
package packages a running vagrant environment into a box
plugin manages plugins: install, uninstall, update, etc.
port displays information about guest port mappings
powershell connects to machine via powershell remoting
provision provisions the vagrant machine
push deploys code in this environment to a configured destination
rdp connects to machine via RDP
reload restarts vagrant machine, loads new Vagrantfile configuration
resume resume a suspended vagrant machine
snapshot manages snapshots: saving, restoring, etc.
ssh connects to machine via SSH
ssh-config outputs OpenSSH valid configuration to connect to the machine
status outputs status of the vagrant machine
suspend suspends the machine
up starts and provisions the vagrant environment
upload upload to machine via communicator
validate validates the Vagrantfile
version prints current and latest Vagrant version
winrm executes commands on a machine via WinRM
winrm-config outputs WinRM configuration to connect to the machine
For help on any individual command run `vagrant COMMAND -h`
Additional subcommands are available, but are either more advanced
or not commonly used. To see all subcommands, run the command
`vagrant list-commands`.
$ vagrant init
NOTE: Gem::Specificat
Gem::Specificat
/usr/share/
/usr/share/
(eval):3: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
[Regression Potential]
I consider the potential for a regression low, the patches are working fine in Debian and they fix simple deprecated features in Ruby 2.7 (Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call). The proposed changes were already applied in multiple Ruby packages to fix the same issue, even upstream. However, those patches were backported to vagrant 2.2.6 from Debian which has vagrant version 2.2.7, so this might make room for some mistake.
==== Original description ====
When calling vagrant subcommands, or just vagrant itself without any argument to produce help output, every time the following block of ruby warnings appears:
$ vagrant
NOTE: Gem::Specificat
Gem::Specificat
NOTE: Gem::Specificat
Gem::Specificat
/usr/share/
/usr/share/
/usr/share/
/usr/share/
(eval):3: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/
[... actual output starts here ...]
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: vagrant 2.2.6+dfsg-2ubuntu1
ProcVersionSign
Uname: Linux 5.4.0-21-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu25
Architecture: amd64
CurrentDesktop: MATE
Date: Wed Apr 8 20:20:25 2020
InstallationDate: Installed on 2020-04-06 (2 days ago)
InstallationMedia: Ubuntu-Server 20.04 LTS "Focal Fossa" - Beta amd64 (20200402)
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: vagrant
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Bryce Harrington (community): Approve
- Canonical Server MOTU reviewers: Pending requested
- Canonical Server: Pending requested
-
Diff: 247 lines (+59/-34)2 files modifieddebian/changelog (+8/-0)
debian/patches/0009-Fix-more-warnings-under-ruby-2.7.patch (+51/-34)
- Bryce Harrington (community): Approve
- Canonical Server MOTU reviewers: Pending requested
-
Diff: 395 lines (+367/-0)4 files modifieddebian/changelog (+10/-0)
debian/patches/0008-Fix-warnings-for-ruby-2.7.patch (+113/-0)
debian/patches/0009-Fix-more-warnings-under-ruby-2.7.patch (+242/-0)
debian/patches/series (+2/-0)
description: | updated |
tags: | added: verification-needed-focal |
tags: | added: verification-needed |
Changed in vagrant (Ubuntu): | |
status: | Confirmed → In Progress |
summary: |
- vagrant spits out ruby deprecation warnings on every call + [SRU] vagrant spits out ruby deprecation warnings on every call |
tags: |
added: verification-done-focal removed: verification-needed verification-needed-focal |
Changed in vagrant (Ubuntu Focal): | |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in vagrant (Ubuntu): | |
status: | In Progress → Fix Released |
This has been fixed in a new Debian Release (2.2.7+dfsg-1). Tested a package built on Focal and these warnings go away.
Specifically they added two patches: warnings- for-ruby- 2.7.patch more-warnings- under-ruby- 2.7.patch
0006-Fix-
0007-Fix-
Since this is in universe but a popular too, hoping we can sneak in a Debian sync for Focal with the new version as well to fix this otherwise I can look to submit a patch for the warnings specifically.