← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2034952] Re: dashboard failures with Django 4.2.4

 

** Summary changed:

- manila-ui failures with Django 4.2.4
+ dashboard failures with Django 4.2.4

** Also affects: neutron-vpnaas-dashboard
   Importance: Undecided
       Status: New

** Description changed:

  Running unit tests with Django==4.2.4 results in 124 errors. They seem
  to be limited to the same error:
+ 
+ == manila-ui ==
  
  ======================================================================
  ERROR: test_migration_get_progress (manila_ui.tests.dashboards.admin.shares.test_forms.ManilaDashboardsAdminMigrationFormTests)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/corey/pkg/bobcat/upstream/manila-ui/manila_ui/tests/dashboards/admin/shares/test_forms.py", line 29, in setUp
      self.request = wsgi.WSGIRequest(FAKE_ENVIRON)
    File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 78, in __init__
      self._stream = LimitedStream(self.environ["wsgi.input"], content_length)
    File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 24, in __init__
      self._read = stream.read
  AttributeError: 'str' object has no attribute 'read'
  
  To reproduce:
  git clone https://opendev.org/openstack/manila-ui; cd manila-ui
  tox -e py3
  .tox/py3/bin/pip3 install Django==4.2.4
  tox -e py3
  
  
+ == horizon ==
+ 
  I'm also hitting a similar error that seems to need fixing in horizon:
  
  ======================================================================
  ERROR: test_view_1_None (manila_ui.tests.dashboards.project.user_messages.tests.UserMessagesViewTests)
  ----------------------------------------------------------------------
- Traceback (most recent call last):                                                                                 
-   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/ddt.py", line 220, in wrapper
-     return func(self, *args, **kwargs)                   
-   File "/home/corey/pkg/bobcat/upstream/manila-ui/manila_ui/tests/dashboards/project/user_messages/tests.py", line 44, in test_view
-     self.assertNoMessages()                              
-   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/horizon/test/helpers.py", line 195, in assertNoMessages
-     self.assertMessageCount(response, success=0, warn=0, info=0, error=0)
-   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/horizon/test/helpers.py", line 203, in assertMessageCount
-     temp_req = self.client.request(**{'wsgi.input': None})
-   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/test/client.py", line 886, in request
-     response = self.handler(environ)                     
-   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/test/client.py", line 168, in __call__
-     request = WSGIRequest(environ)                       
-   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 79, in __init__
-     self._stream = LimitedStream(self.environ["wsgi.input"], content_length)
-   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 25, in __init__
-     self._read = stream.read                        
+ Traceback (most recent call last):
+   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/ddt.py", line 220, in wrapper
+     return func(self, *args, **kwargs)
+   File "/home/corey/pkg/bobcat/upstream/manila-ui/manila_ui/tests/dashboards/project/user_messages/tests.py", line 44, in test_view
+     self.assertNoMessages()
+   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/horizon/test/helpers.py", line 195, in assertNoMessages
+     self.assertMessageCount(response, success=0, warn=0, info=0, error=0)
+   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/horizon/test/helpers.py", line 203, in assertMessageCount
+     temp_req = self.client.request(**{'wsgi.input': None})
+   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/test/client.py", line 886, in request
+     response = self.handler(environ)
+   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/test/client.py", line 168, in __call__
+     request = WSGIRequest(environ)
+   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 79, in __init__
+     self._stream = LimitedStream(self.environ["wsgi.input"], content_length)
+   File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 25, in __init__
+     self._read = stream.read
  AttributeError: 'NoneType' object has no attribute 'read'
+ 
+ 
+ == neutron-vpnaas-dashboard errors ==
+ 
+ ======================================================================                
+ FAIL: test_add_endpointgroup_get (neutron_vpnaas_dashboard.dashboards.project.vpn.tests.VPNTests.test_add_endpointgroup_get)
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):                                                                                                                                           
+   File "/root/neutron-vpnaas-dashboard/.tox/py3/lib/python3.11/site-packages/openstack_dashboard/test/helpers.py", line 134, in wrapped
+     retval = function(inst, *args, **kwargs)                                          
+              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                 
+   File "/root/neutron-vpnaas-dashboard/neutron_vpnaas_dashboard/dashboards/project/vpn/tests.py", line 334, in test_add_endpointgroup_get
+     self.assertQuerysetEqual(workflow.steps, expected_objs)                                                                                                                  
+   File "/root/neutron-vpnaas-dashboard/.tox/py3/lib/python3.11/site-packages/django/test/testcases.py", line 1330, in assertQuerysetEqual                                    
+     return self.assertQuerySetEqual(*args, **kw)                      
+            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                             
+   File "/root/neutron-vpnaas-dashboard/.tox/py3/lib/python3.11/site-packages/django/test/testcases.py", line 1346, in assertQuerySetEqual                                    
+     return self.assertEqual(list(items), values, msg=msg)
+            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                    
+ AssertionError: Lists differ: [<AddEndpointGroupStep: addendpointgroupaction>] != ['<AddEndpointGroupStep: addendpointgroupaction>']                                         
+                                                                                       
+ First differing element 0:                                                                                                                                                   
+ <AddEndpointGroupStep: addendpointgroupaction>  
+ '<AddEndpointGroupStep: addendpointgroupaction>'                                      
+                                                                                                                                                                              
+ - [<AddEndpointGroupStep: addendpointgroupaction>]       
+ + ['<AddEndpointGroupStep: addendpointgroupaction>']     
+ ?  +                                              +

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

Title:
  dashboard failures with Django 4.2.4

Status in OpenStack Dashboard (Horizon):
  In Progress
Status in manila-ui:
  Fix Released
Status in Neutron VPNaaS dashboard:
  New

Bug description:
  Running unit tests with Django==4.2.4 results in 124 errors. They seem
  to be limited to the same error:

  == manila-ui ==

  ======================================================================
  ERROR: test_migration_get_progress (manila_ui.tests.dashboards.admin.shares.test_forms.ManilaDashboardsAdminMigrationFormTests)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/corey/pkg/bobcat/upstream/manila-ui/manila_ui/tests/dashboards/admin/shares/test_forms.py", line 29, in setUp
      self.request = wsgi.WSGIRequest(FAKE_ENVIRON)
    File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 78, in __init__
      self._stream = LimitedStream(self.environ["wsgi.input"], content_length)
    File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 24, in __init__
      self._read = stream.read
  AttributeError: 'str' object has no attribute 'read'

  To reproduce:
  git clone https://opendev.org/openstack/manila-ui; cd manila-ui
  tox -e py3
  .tox/py3/bin/pip3 install Django==4.2.4
  tox -e py3

  
  == horizon ==

  I'm also hitting a similar error that seems to need fixing in horizon:

  ======================================================================
  ERROR: test_view_1_None (manila_ui.tests.dashboards.project.user_messages.tests.UserMessagesViewTests)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/ddt.py", line 220, in wrapper
      return func(self, *args, **kwargs)
    File "/home/corey/pkg/bobcat/upstream/manila-ui/manila_ui/tests/dashboards/project/user_messages/tests.py", line 44, in test_view
      self.assertNoMessages()
    File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/horizon/test/helpers.py", line 195, in assertNoMessages
      self.assertMessageCount(response, success=0, warn=0, info=0, error=0)
    File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/horizon/test/helpers.py", line 203, in assertMessageCount
      temp_req = self.client.request(**{'wsgi.input': None})
    File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/test/client.py", line 886, in request
      response = self.handler(environ)
    File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/test/client.py", line 168, in __call__
      request = WSGIRequest(environ)
    File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 79, in __init__
      self._stream = LimitedStream(self.environ["wsgi.input"], content_length)
    File "/home/corey/pkg/bobcat/upstream/manila-ui/.tox/py3/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 25, in __init__
      self._read = stream.read
  AttributeError: 'NoneType' object has no attribute 'read'

  
  == neutron-vpnaas-dashboard errors ==

  ======================================================================                
  FAIL: test_add_endpointgroup_get (neutron_vpnaas_dashboard.dashboards.project.vpn.tests.VPNTests.test_add_endpointgroup_get)
  ----------------------------------------------------------------------
  Traceback (most recent call last):                                                                                                                                           
    File "/root/neutron-vpnaas-dashboard/.tox/py3/lib/python3.11/site-packages/openstack_dashboard/test/helpers.py", line 134, in wrapped
      retval = function(inst, *args, **kwargs)                                          
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                 
    File "/root/neutron-vpnaas-dashboard/neutron_vpnaas_dashboard/dashboards/project/vpn/tests.py", line 334, in test_add_endpointgroup_get
      self.assertQuerysetEqual(workflow.steps, expected_objs)                                                                                                                  
    File "/root/neutron-vpnaas-dashboard/.tox/py3/lib/python3.11/site-packages/django/test/testcases.py", line 1330, in assertQuerysetEqual                                    
      return self.assertQuerySetEqual(*args, **kw)                      
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                             
    File "/root/neutron-vpnaas-dashboard/.tox/py3/lib/python3.11/site-packages/django/test/testcases.py", line 1346, in assertQuerySetEqual                                    
      return self.assertEqual(list(items), values, msg=msg)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                    
  AssertionError: Lists differ: [<AddEndpointGroupStep: addendpointgroupaction>] != ['<AddEndpointGroupStep: addendpointgroupaction>']                                         
                                                                                        
  First differing element 0:                                                                                                                                                   
  <AddEndpointGroupStep: addendpointgroupaction>  
  '<AddEndpointGroupStep: addendpointgroupaction>'                                      
                                                                                                                                                                               
  - [<AddEndpointGroupStep: addendpointgroupaction>]       
  + ['<AddEndpointGroupStep: addendpointgroupaction>']     
  ?  +                                              +

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