Building on Horizon tutorial startdash command broken

Bug #1496164 reported by Cindy Lu
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Richard Jones

Bug Description

http://docs.openstack.org/developer/horizon/topics/tutorial.html

Run the following commands:

====

mkdir openstack_dashboard/dashboards/mydashboard

./run_tests.sh -m startdash mydashboard \
              --target openstack_dashboard/dashboards/mydashboard

====

startdash command is broken. Gives "KeyError: extensions" on this line:

https://github.com/openstack/horizon/blob/master/horizon/management/commands/startdash.py#L50

Revision history for this message
Rishikesh Radhakrishnan (rishikesh-radhakrishnan) wrote :

I checked out the stable/juno branch and was able to use it without any errors. Seems like the error is in the master branch.

Revision history for this message
Coulin Jean-Luc (jean-luc-coulin) wrote :

Hello guys,

I'm sure it's not the right way to do it but I did a quick workaround to make this command work again (not sure it do what expected sic).

1) Add options["extensions"] = [] before the line 50 in the file horizon/horizon/management/commands/startdash.py

2) Add options['files'] = [] before line 89 in the file horizon/.venv/local/lib/python2.7/site-packages/django/core/management/templates.py

Best regards

Revision history for this message
Coulin Jean-Luc (jean-luc-coulin) wrote :

One more time ... with the startpanel command.

I added a options["extensions"] = [] before line 85 of the /home/jeec6230/Documents/Developments/spyder/horizon/horizon/management/commands/startpanel.py file

Alexey Galkin (agalkin)
Changed in horizon:
status: New → Confirmed
assignee: nobody → Alexey Galkin (agalkin)
Revision history for this message
Alexey Galkin (agalkin) wrote :

I think that the file horizon/.venv/local/lib/python2.7/site-packages/django/core/management/templates.py directly related to the Django project. So, in my opinion, we need to wait for a fix in the most Django.
And for the other files:
1) horizon/horizon/management/commands/startdash.py
2) horizon/horizon/management/commands/startpanel.py
I will prepared to make fix and upload to review coming soon.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/236752

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
Alexey Galkin (agalkin) wrote :
Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :

Hi, so, as we can see the command from our tutorial doesn't work because of this issue. We have the workaround which was described by Coulin Jean-Luc and commited by Alexey Galkin. Let's merge the fix or provide other workaround or fix for the issue.

Thank you!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/237274

Changed in horizon:
assignee: Alexey Galkin (agalkin) → Richard Jones (r1chardj0n3s)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Alexey Galkin (<email address hidden>) on branch: master
Review: https://review.openstack.org/236752
Reason: Agree with Richard Jone, his fix on the link above looks better.

Changed in horizon:
importance: Undecided → High
milestone: none → mitaka-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/237274
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=438a5d0566b61973b8f054a9c6c940f72e436f7a
Submitter: Jenkins
Branch: master

commit 438a5d0566b61973b8f054a9c6c940f72e436f7a
Author: Richard Jones <email address hidden>
Date: Tue Oct 20 09:35:48 2015 +1100

    Update startdash/startpanel for newer Django patterns

    Django has transitioned to argparse for management commands, and this
    patch migrates Horizon's commands to use the newer patterns.

    Change-Id: Ib62286a92dd026d2e1224193a93f00846aa07fff
    Closes-bug: #1496164

Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.