Bug 2095832 - Regressions in ChannelzServicerTest with Python 3.11
Summary: Regressions in ChannelzServicerTest with Python 3.11
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: grpc
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ben Beasley
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-10 17:14 UTC by Ben Beasley
Modified: 2023-07-14 00:54 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-07-14 00:54:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ben Beasley 2022-06-10 17:14:57 UTC
Some tests are being skipped for Python 3.11 to avoid blocking the mass rebuild. These issues should be reported upstream in a useful/actionable way.

Errors/Failures: 
channelz._channelz_servicer_test.ChannelzServicerTest.test_get_one_server
traceback:
Traceback (most recent call last):
  File "/usr/lib64/python3.11/unittest/case.py", line 57, in testPartExecutor
    yield
    ^^^^^
  File "/usr/lib64/python3.11/unittest/case.py", line 623, in run
    self._callTestMethod(testMethod)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/unittest/case.py", line 579, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "/builddir/build/BUILD/grpc-1.46.3/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py", line 287, in test_get_one_server
    self.assertEqual(len(gss_resp.server), 1)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 2 != 1

stdout:
None
stderr:
None


channelz._channelz_servicer_test.ChannelzServicerTest.test_server_basic
traceback:
Traceback (most recent call last):
  File "/usr/lib64/python3.11/unittest/case.py", line 57, in testPartExecutor
    yield
    ^^^^^
  File "/usr/lib64/python3.11/unittest/case.py", line 623, in run
    self._callTestMethod(testMethod)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/unittest/case.py", line 579, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "/builddir/build/BUILD/grpc-1.46.3/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py", line 281, in test_server_basic
    self.assertEqual(len(resp.server), 1)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 6 != 1

stdout:
None
stderr:
None


channelz._channelz_servicer_test.ChannelzServicerTest.test_server_call
traceback:
Traceback (most recent call last):
  File "/usr/lib64/python3.11/unittest/case.py", line 57, in testPartExecutor
    yield
    ^^^^^
  File "/usr/lib64/python3.11/unittest/case.py", line 623, in run
    self._callTestMethod(testMethod)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/unittest/case.py", line 579, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "/builddir/build/BUILD/grpc-1.46.3/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py", line 305, in test_server_call
    self.assertEqual(len(resp.server), 1)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 6 != 1

stdout:
None
stderr:
None


channelz._channelz_servicer_test.ChannelzServicerTest.test_server_listen_sockets
traceback:
Traceback (most recent call last):
  File "/usr/lib64/python3.11/unittest/case.py", line 57, in testPartExecutor
    yield
    ^^^^^
  File "/usr/lib64/python3.11/unittest/case.py", line 623, in run
    self._callTestMethod(testMethod)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/unittest/case.py", line 579, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "/builddir/build/BUILD/grpc-1.46.3/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py", line 420, in test_server_listen_sockets
    self.assertEqual(len(gss_resp.server), 1)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 7 != 1

stdout:
None
stderr:
None


channelz._channelz_servicer_test.ChannelzServicerTest.test_server_sockets
traceback:
Traceback (most recent call last):
  File "/usr/lib64/python3.11/unittest/case.py", line 57, in testPartExecutor
    yield
    ^^^^^
  File "/usr/lib64/python3.11/unittest/case.py", line 623, in run
    self._callTestMethod(testMethod)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/unittest/case.py", line 579, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "/builddir/build/BUILD/grpc-1.46.3/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py", line 404, in test_server_sockets
    self.assertEqual(len(gs_resp.server), 1)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 7 != 1

stdout:
None
stderr:
None

Comment 1 Ben Beasley 2022-06-10 17:38:42 UTC
I managed to run these tests with Python 3.11 using pip/virtualenv and didn’t see the same failures. That will make it harder to report them upstream. There could possibly be a Python 3.11 issue with one of the dependencies that is fixed in a version not yet in Fedora, or perhaps some other difference in the two build environments is playing a role.

In general, building and testing grpc is pretty difficult, and the RPM build environment is necessarily quite a bit different from upstream’s approach. It’s a lot easier to get bugs fixed upstream if you already understand what is happening and can explain it and offer a PR.

My next step would be to find out what the actual contents of the over-long responses are in the RPM build environment, and try to understand why that might happen.

Comment 2 Ben Cotton 2022-08-09 13:39:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 3 Ben Beasley 2023-07-14 00:54:41 UTC
I’m not planning to work on this in the foreseeable future.


Note You need to log in before you can comment on or make changes to this bug.