Warning is emitted during TCP socket initialization when executed with ruby 2.7

Bug #1868862 reported by Lucas Kanashiro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ruby-net-ldap (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

A warning is emitted when a TCP socket is initialized after the ruby 2.7 transition, this is causing a ruby-activeldap regression. Below you can see one of the failures:

===============================================================================
Failure: test_non_exist_user(TestUsermodLangAdd)
/tmp/autopkgtest.XF7v58/build.HWx/src/test/test_usermod-lang-add.rb:19:in `block in test_non_exist_user'
     16: def test_non_exist_user
     17: ensure_delete_user("test-user") do |uid,|
     18: assert(!@user_class.exists?(uid))
  => 19: assert_equal([false, "User #{uid} doesn't exist.\n"],
     20: run_command(uid, "New CN", 11111))
     21: assert(!@user_class.exists?(uid))
     22: end
/tmp/autopkgtest.XF7v58/build.HWx/src/test/al-test-utils.rb:335:in `ensure_delete_user'
/tmp/autopkgtest.XF7v58/build.HWx/src/test/test_usermod-lang-add.rb:17:in `test_non_exist_user'
<[false, "User test-user doesn't exist.\n"]> expected but was
<[false,
 "/usr/lib/ruby/vendor_ruby/net/ldap/connection.rb:709: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call\n" +
 "/usr/lib/ruby/2.7.0/socket.rb:623: warning: The called method `tcp' is defined here\n" +
 "User test-user doesn't exist.\n"]>

diff:
+ [false,
+ "/usr/lib/ruby/vendor_ruby/net/ldap/connection.rb:709: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call\n" +
+ "/usr/lib/ruby/2.7.0/socket.rb:623: warning: The called method `tcp' is defined here\n" +
? [false, "User test-user doesn't exist.\n"]
===============================================================================

This is not a regression because the expected behavior happens but the test fails because of the ruby-net-ldap warning.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

The attached debdiff fixes the warning and consequently the ruby-activeldap autopkgtest failure:

Finished in 79.427183909 seconds.
-------------------------------------------------------------------------------
444 tests, 1014 assertions, 0 failures, 0 errors, 0 pendings, 1 omissions, 0 notifications
100% passed
-------------------------------------------------------------------------------
5.59 tests/s, 12.77 assertions/s
mv .gem2deb.lib lib
autopkgtest [15:18:11]: test command1: -----------------------]
autopkgtest [15:18:12]: test command1: - - - - - - - - - - results - - - - - - - - - -
command1 PASS
autopkgtest [15:18:12]: @@@@@@@@@@@@@@@@@@@@ summary
command1 PASS

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Taking a look

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Forward it to upstream and fixed some typos in patch description.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Add reference to this LP bug in the patch description and mention the patch filename in d/changelog.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks, sponsored:

$ dput ubuntu ../ruby-net-ldap_0.16.1-1ubuntu1_source.changes
Checking signature on .changes
gpg: ../ruby-net-ldap_0.16.1-1ubuntu1_source.changes: Valid signature from AC983EB5BF6BCBA9
Checking signature on .dsc
gpg: ../ruby-net-ldap_0.16.1-1ubuntu1.dsc: Valid signature from AC983EB5BF6BCBA9
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ruby-net-ldap_0.16.1-1ubuntu1.dsc: done.
  Uploading ruby-net-ldap_0.16.1-1ubuntu1.debian.tar.xz: done.
  Uploading ruby-net-ldap_0.16.1-1ubuntu1_source.buildinfo: done.
  Uploading ruby-net-ldap_0.16.1-1ubuntu1_source.changes: done.
Successfully uploaded packages.

Changed in ruby-net-ldap (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ruby-net-ldap - 0.16.1-1ubuntu1

---------------
ruby-net-ldap (0.16.1-1ubuntu1) focal; urgency=medium

  * d/p/0002-Do-not-use-keyword-parameter-in-tcp-call.patch: add patch to
    avoid passing keyword parameter in tcp call, fixing a warning when it is
    executed with ruby 2.7. This patch will fix a ruby-activeldap autopkgtest
    regression (LP: #1868862).

 -- Lucas Kanashiro <email address hidden> Tue, 24 Mar 2020 15:25:55 -0300

Changed in ruby-net-ldap (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.