Jira (PDB-4971) PDB terminus generates a warning on ruby 2.7

6 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Nov 19, 2020, 7:04:04 PM11/19/20
to puppe...@googlegroups.com
Josh Cooper created an issue
 
PuppetDB / Bug PDB-4971
PDB terminus generates a warning on ruby 2.7
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/11/19 4:03 PM
Priority: Normal Normal
Reporter: Josh Cooper

When using the puppetdb terminus in puppet-agent 7, the terminus calls the http client in a way that triggers a ruby warning:

/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb.rb:75: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/http/client.rb:265: warning: The called method `post' is defined here

this causes a PE#main test to fail when running puppet node purge and expecting no warnings. There are some other ruby 2.7 warnings when running the puppetdb rspec tests:

$ bx rspec -Ipuppet/spec puppet/spec/
/Users/josh/work/puppetdb/puppet/lib/puppet/face/node/deactivate.rb:6: warning: already initialized constant CommandDeactivateNode
/Users/josh/work/puppetdb/puppet/spec/unit/indirector/node/puppetdb_spec.rb:13: warning: previous definition of CommandDeactivateNode was here
...../Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
..................................................../Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
.../Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:60: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:60: warning: URI.unescape is obsolete
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:60: warning: URI.unescape is obsolete
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:60: warning: URI.unescape is obsolete
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:60: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:130: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
../Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:130: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:130: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:130: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:130: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:130: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:130: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:130: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:130: warning: URI.unescape is obsolete
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/facts/puppetdb.rb:130: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/resource/puppetdb.rb:33: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/resource/puppetdb.rb:33: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/resource/puppetdb.rb:33: warning: URI.unescape is obsolete
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/resource/puppetdb.rb:33: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/resource/puppetdb.rb:33: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
/Users/josh/work/puppetdb/puppet/lib/puppet/indirector/resource/puppetdb.rb:33: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
./Users/josh/work/puppetdb/puppet/lib/puppet/indirector/resource/puppetdb.rb:33: warning: URI.unescape is obsolete
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
............./Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
/Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
............................./Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
........................................................./Users/josh/work/puppetdb/.bundle/ruby/2.7.0/gems/json_pure-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Zachary Kent (Jira)

unread,
Dec 3, 2020, 6:47:03 PM12/3/20
to puppe...@googlegroups.com
Zachary Kent updated an issue
Change By: Zachary Kent
Fix Version/s: PDB 7.0.1

Josh Cooper (Jira)

unread,
Dec 4, 2020, 1:08:05 PM12/4/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Labels: platform_7.1

Austin Blatt (Jira)

unread,
Dec 7, 2020, 2:36:04 PM12/7/20
to puppe...@googlegroups.com
Austin Blatt assigned an issue to Austin Blatt
Change By: Austin Blatt
Assignee: Austin Blatt
Reply all
Reply to author
Forward
0 new messages