[Yahoo-eng-team] [Bug 2043116] Re: Unit test fails with oslo.utils 6.3.0

2023-11-09 Thread OpenStack Infra
Reviewed:  https://review.opendev.org/c/openstack/nova/+/900532
Committed: 
https://opendev.org/openstack/nova/commit/e04d20a8bc3cfea11c9699219919d0a0158d74fb
Submitter: "Zuul (22348)"
Branch:master

commit e04d20a8bc3cfea11c9699219919d0a0158d74fb
Author: Takashi Kajinami 
Date:   Thu Nov 9 23:58:39 2023 +0900

Fix unit tests broken by olso.utils

Some of the object unit tests grub Mock object unintentionally, and
that results in failure during initializing an versioned object,
because the Mock object does not present its version correctly.

This fixes that problem

The sqlalchemy-2x job is made non-voting because this job requires
oslo.utils 6.3.0 which is blocked by this problem.

Closes-Bug: #2043116
Related-Bug: #2042886
Change-Id: Id1c1b77c020e2d8f0ac61c2aee86c9f37d388d53


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

-- 
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:
  Fix Released
Status in OpenStack Compute (nova):
  Fix Released

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


[Yahoo-eng-team] [Bug 2043116] Re: Unit test fails with oslo.utils 6.3.0

2023-11-09 Thread OpenStack Infra
Reviewed:  https://review.opendev.org/c/openstack/ironic/+/900533
Committed: 
https://opendev.org/openstack/ironic/commit/fa8df69194be12b9fe97253d8dd14013381ca92a
Submitter: "Zuul (22348)"
Branch:master

commit fa8df69194be12b9fe97253d8dd14013381ca92a
Author: Takashi Kajinami 
Date:   Fri Nov 10 00:05:52 2023 +0900

Fix unit tests broken by olso.utils

Some of the object unit tests grub Mock object unintentionally, and
that results in failure during initializing an versioned object,
because the Mock object does not present its version correctly.

This fixes that problem.

The sqlalchemy-2x job is made non-voting because this job requires
oslo.utils 6.3.0 which is blocked by this problem.

Closes-Bug: #2043116
Related-Bug: #2042886
Change-Id: I1a622ab9c766d46b7eb4442848e91f25b26f6c61


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

-- 
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:
  Fix Released
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


[Yahoo-eng-team] [Bug 2043141] [NEW] neutron-lib unit tests need update for sqlalchemy 2.0

2023-11-09 Thread Brian Haley
Public bug reported:

Some of the neutron-lib unit tests do not support sqlalchemy 2.0.

Thomas Goirand ran them on a Debian system and this test file fails:

  neutron_lib/tests/unit/db/test_sqlalchemytypes.py

There are 8 failures, all basically the same:

105s FAIL: neutron_lib.tests.unit.db.test_sqlalchemytypes.CIDRTestCase.test_crud
105s neutron_lib.tests.unit.db.test_sqlalchemytypes.CIDRTestCase.test_crud
105s --
105s testtools.testresult.real._StringException: Traceback (most recent call 
last):
105s   File 
"/tmp/autopkgtest-lxc.jvth6_27/downtmp/build.pBL/src/neutron_lib/tests/unit/db/test_sqlalchemytypes.py",
 line 36, in setUp
105s meta = sa.MetaData(bind=self.engine)
105s^
105s TypeError: MetaData.__init__() got an unexpected keyword argument 'bind'

>From looking at the functional tests and Nova code, should be a
straightforward fix.

We should also look at creating a test job that both tests sqlalchemy
2.0 and neutron-lib main/master branches so we don't regress.

** Affects: neutron
 Importance: High
 Assignee: Brian Haley (brian-haley)
 Status: In Progress


** Tags: unittest

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

Title:
  neutron-lib unit tests need update for sqlalchemy 2.0

Status in neutron:
  In Progress

Bug description:
  Some of the neutron-lib unit tests do not support sqlalchemy 2.0.

  Thomas Goirand ran them on a Debian system and this test file fails:

neutron_lib/tests/unit/db/test_sqlalchemytypes.py

  There are 8 failures, all basically the same:

  105s FAIL: 
neutron_lib.tests.unit.db.test_sqlalchemytypes.CIDRTestCase.test_crud
  105s neutron_lib.tests.unit.db.test_sqlalchemytypes.CIDRTestCase.test_crud
  105s --
  105s testtools.testresult.real._StringException: Traceback (most recent call 
last):
  105s   File 
"/tmp/autopkgtest-lxc.jvth6_27/downtmp/build.pBL/src/neutron_lib/tests/unit/db/test_sqlalchemytypes.py",
 line 36, in setUp
  105s meta = sa.MetaData(bind=self.engine)
  105s^
  105s TypeError: MetaData.__init__() got an unexpected keyword argument 'bind'

  From looking at the functional tests and Nova code, should be a
  straightforward fix.

  We should also look at creating a test job that both tests sqlalchemy
  2.0 and neutron-lib main/master branches so we don't regress.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2043141/+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


[Yahoo-eng-team] [Bug 2043116] Re: Unit test fails with oslo.utils 6.3.0

2023-11-09 Thread Takashi Kajinami
** Also affects: ironic
   Importance: Undecided
   Status: New

** Description changed:

  Description
  ===
  
- We recently created oslo.utils 6.3.0 release.
- However when we attempt to bump the version in u-c file[1], unit tests of 
ironic and nova fail with the following errors.
+ 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):
+ Traceback (most recent call last):
  
-   File "/usr/lib/python3.10/unittest/mock.py", line 1379, in patched
- return func(*newargs, **newkeywargs)
+   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/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/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 
"/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)
+   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
+ TypeError: expected string or bytes-like object
  ```
  
- 
- [1] https://review.opendev.org/c/openstack/requirements/+/900517
+ [1] https://bugs.launchpad.net/oslo.utils/+bug/2042886
+ [2] https://review.opendev.org/c/openstack/requirements/+/900517

** Changed in: ironic
 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:
  In Progress
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-tea

[Yahoo-eng-team] [Bug 2043116] [NEW] Unit test fails with oslo.utils 6.3.0

2023-11-09 Thread Takashi Kajinami
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