← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1996527] Re: Unit test failure with Python 3.11

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/864448
Committed: https://opendev.org/openstack/neutron/commit/c5ee9f349548b5bc842054aa26118e205c490aa2
Submitter: "Zuul (22348)"
Branch:    master

commit c5ee9f349548b5bc842054aa26118e205c490aa2
Author: Brian Haley <haleyb.dev@xxxxxxxxx>
Date:   Mon Nov 14 18:06:20 2022 -0500

    Load the required configuration options in the UT classes
    
    Some test classes are not loading the required configuration options
    during the setup process. That prevents from launching thoses tests
    or classes individually. This patch solves this issue by importing the
    required options in the "setUp" test class method.
    
    This is breaking python 3.11 on Debian, not possible to test
    in the gate at the moment.
    
    Closes-Bug: #1996527
    
    Change-Id: Ie579df7126ca8d09dbedad8d2254c79ec0d3bc32


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1996527

Title:
  Unit test failure with Python 3.11

Status in neutron:
  Fix Released

Bug description:
  Hi,

  In Debian, we're trying to switch to 3.11 before the Bookworm freeze
  in January.

  Rebuilding Neutron under Python 3.11 fails:

  FAIL: neutron.tests.unit.plugins.ml2.drivers.ovn.mech_driver.test_mech_driver.TestOVNMechanismDriverPortsV2.test__port_provisioned_no_binding
  neutron.tests.unit.plugins.ml2.drivers.ovn.mech_driver.test_mech_driver.TestOVNMechanismDriverPortsV2.test__port_provisioned_no_binding
  ----------------------------------------------------------------------
  testtools.testresult.real._StringException: Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py", line 2817, in setUp
      ovn_conf.cfg.CONF.set_override('ovn_metadata_enabled', False,
    File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 2077, in __inner
      result = f(self, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 2460, in set_override
      opt_info = self._get_opt_info(name, group)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 2869, in _get_opt_info
      group = self._get_group(group)
              ^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 2838, in _get_group
      raise NoSuchGroupError(group_name)
  oslo_config.cfg.NoSuchGroupError: no such group [ovn]

  and 145 more like this one...

  This looks weird to me though, and unrelated to OVN.

  Cheers,

  Thomas

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1996527/+subscriptions



References