[openstack-dev] Fwd: [Horizon] Last remaining Django 1.7 issue in Horizon (and other OpenStack packages)

Thomas Goirand zigo at debian.org
Thu Sep 11 07:25:07 UTC 2014


Hi,

Here's a message from the maintainer of python-django in Debian. We've
been trying to switch to Django 1.7, because we would like to benefits
from its security support for the life of Debian Jessie.

I have already fixed numerous Debian packages regarding Django 1.7
compatibility (for example: python-appconf,
python-django-openstack-auth, python-django-compressor,
python-django-pycss, tuskar-ui, many issues in Horizon, and more...).

This is (hopefully...) the very last remaining issue, so it'd be really
cool to get at least comments on it, so I can consider everything
solved. Input from the Horizon team would be great.

BTW, I'd like to publicly thanks Raphael for all the help he provided
investigating many of the Django 1.7 issues in OpenStack related
packages. He's been really great and supportive, plus warned soon enough
so we had time to fix everything together.

Cheers,

Thomas Goirand (zigo)

-------- Original Message --------
Subject: [PKG-Openstack-devel] Bug#755651: [openstack-dev] [horizon]
Support for Django 1.7: there's a bit of work, though it looks fixable
to me...
Resent-Date: Wed, 10 Sep 2014 20:45:23 +0000
Resent-From: Raphael Hertzog <hertzog at debian.org>
Resent-To: debian-bugs-dist at lists.debian.org
Resent-CC: PKG OpenStack <openstack-devel at lists.alioth.debian.org>
Date: Wed, 10 Sep 2014 22:42:09 +0200
From: Raphael Hertzog <hertzog at debian.org>
Reply-To: Tracking bugs and development for OpenStack
<openstack-devel at lists.alioth.debian.org>
To: Thomas Goirand <zigo at debian.org>
CC: OpenStack Development Mailing List (not for usage questions)
<openstack-dev at lists.openstack.org>, 755651 at bugs.debian.org

[ I'm not subscribed to openstack-devel, please cc me ]

On Tue, 05 Aug 2014, Thomas Goirand wrote:
> I'm now down to only a single error not solved:
> 
> ======================================================================
> FAIL: test_update_project_when_default_role_does_not_exist
> (openstack_dashboard.dashboards.admin.projects.tests.UpdateProjectWorkflowTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
> "/home/zigo/sources/openstack/icehouse/horizon/build-area/horizon-2014.1.1/openstack_dashboard/test/helpers.py",
> line 83, in instance_stub_out
>     return fn(self, *args, **kwargs)
>   File
> "/home/zigo/sources/openstack/icehouse/horizon/build-area/horizon-2014.1.1/openstack_dashboard/dashboards/admin/projects/tests.py",
> line 1458, in test_update_project_when_default_role_does_not_exist
>     self.client.get(url)
> AssertionError: NotFound not raised
> 
> Any idea?

I looked further into this and in fact the exceptions is caught by the
template rendering code (IncludeNode.render() in
django/template/loader_tags.py while processing the include of
'horizon/common/_workflow.html' and to be more precise the processing of
'{% if step.has_required_fields %}' is the exact place where the exception
is fired). I can get the test to pass by changing the Django setting
TEMPLATE_DEBUG to True.

Django 1.6 has a slightly different code here and doesn't intercept
it (I'm not sure why, but I did two parallel step by step execution
with pdb to verify this).

But such a setting is not appropriate for production usage and somehow I
expect horizon to rely on the fact that the exception can be caught in
some upper level. So I'm not quite sure what to suggest here.

The expected behaviour is not clear to me and relying on exception
propagation from code executed indirectly in template rendering seems
bad design from the start.

That said the consequences of this failing test is "just" that we get a
page without any useful content instead of an "internal server error".
Not sure that it matters much either...

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/

_______________________________________________
Openstack-devel mailing list
Openstack-devel at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/openstack-devel




More information about the OpenStack-dev mailing list