Public bug reported:

Description
===========

We recently created oslo.utils 6.3.0 release which includes the fix for
the bug[1] affecting sqlalchemy-master jobs.

However when we attempt to bump the version in u-c file[2], unit tests
of ironic and nova fail with the following errors.

```
nova.tests.unit.objects.test_objects.TestRegistry.test_hook_keeps_newer_properly
--------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/usr/lib/python3.10/unittest/mock.py", line 1379, in patched
    return func(*newargs, **newkeywargs)

      File 
"/home/zuul/src/opendev.org/openstack/nova/nova/tests/unit/objects/test_objects.py",
 line 1060, in test_hook_keeps_newer_properly
    reg.registration_hook(MyObj, 0)

      File "/home/zuul/src/opendev.org/openstack/nova/nova/objects/base.py", 
line 72, in registration_hook
    cur_version = versionutils.convert_version_to_tuple(

      File 
"/home/zuul/src/opendev.org/openstack/nova/.tox/py310/lib/python3.10/site-packages/oslo_utils/versionutils.py",
 line 91, in convert_version_to_tuple
    version_str = re.sub(r'(\d+)(a|alpha|b|beta|rc)\d+$', '\\1', version_str)

      File "/usr/lib/python3.10/re.py", line 209, in sub
    return _compile(pattern, flags).sub(repl, string, count)

    TypeError: expected string or bytes-like object
```

[1] https://bugs.launchpad.net/oslo.utils/+bug/2042886
[2] https://review.opendev.org/c/openstack/requirements/+/900517

** Affects: ironic
     Importance: Undecided
     Assignee: Takashi Kajinami (kajinamit)
         Status: New

** Affects: nova
     Importance: Undecided
     Assignee: Takashi Kajinami (kajinamit)
         Status: In Progress

** Changed in: nova
     Assignee: (unassigned) => Takashi Kajinami (kajinamit)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/2043116

Title:
  Unit test fails with oslo.utils 6.3.0

Status in Ironic:
  New
Status in OpenStack Compute (nova):
  In Progress

Bug description:
  Description
  ===========

  We recently created oslo.utils 6.3.0 release which includes the fix
  for the bug[1] affecting sqlalchemy-master jobs.

  However when we attempt to bump the version in u-c file[2], unit tests
  of ironic and nova fail with the following errors.

  ```
  
nova.tests.unit.objects.test_objects.TestRegistry.test_hook_keeps_newer_properly
  
--------------------------------------------------------------------------------

  Captured traceback:
  ~~~~~~~~~~~~~~~~~~~
      Traceback (most recent call last):

        File "/usr/lib/python3.10/unittest/mock.py", line 1379, in patched
      return func(*newargs, **newkeywargs)

        File 
"/home/zuul/src/opendev.org/openstack/nova/nova/tests/unit/objects/test_objects.py",
 line 1060, in test_hook_keeps_newer_properly
      reg.registration_hook(MyObj, 0)

        File "/home/zuul/src/opendev.org/openstack/nova/nova/objects/base.py", 
line 72, in registration_hook
      cur_version = versionutils.convert_version_to_tuple(

        File 
"/home/zuul/src/opendev.org/openstack/nova/.tox/py310/lib/python3.10/site-packages/oslo_utils/versionutils.py",
 line 91, in convert_version_to_tuple
      version_str = re.sub(r'(\d+)(a|alpha|b|beta|rc)\d+$', '\\1', version_str)

        File "/usr/lib/python3.10/re.py", line 209, in sub
      return _compile(pattern, flags).sub(repl, string, count)

      TypeError: expected string or bytes-like object
  ```

  [1] https://bugs.launchpad.net/oslo.utils/+bug/2042886
  [2] https://review.opendev.org/c/openstack/requirements/+/900517

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


-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to