docs build for django-based projects should run with DJANGO_SETTINGS_MODULE envvar

Bug #1302532 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
In Progress
Undecided
Unassigned
OpenStack Dashboard (Horizon)
Fix Released
Medium
Akihiro Motoki
django-openstack-auth
Fix Released
Medium
Akihiro Motoki

Bug Description

When running docs build in the gate and post jobs for django-based projects (e.g., horizon, django_openstack_auth, ...), we need to set DJANGO_SETTINGS_MODULE envvar.

We can see the following errors in console logs:

horizon-docs, gate-horizon-docs:
ImproperlyConfigured: The SECRET_KEY setting must not be empty.
https://jenkins.openstack.org/view/All/job/horizon-docs/
https://jenkins.openstack.org/view/All/job/gate-horizon-docs/

django-openstack-auth:
error: invalid command 'build_sphinx'
ERROR: InvocationError: '/home/jenkins/workspace/gate-django_openstack_auth-docs/.tox/venv/bin/python setup.py build_sphinx'
It also comes from lack of DJANGO_SETTINGS_MODULES.
https://jenkins.openstack.org/view/All/job/gate-django_openstack_auth-docs/
https://jenkins.openstack.org/view/All/job/django_openstack_auth-docs/

Revision history for this message
Akihiro Motoki (amotoki) wrote :

My plan is:
- to add "docs" env which defines DJANGO_SETTINGS_MODULE and runs build_sphinx to tox.ini in Horizon and Django OpenStack auth.
- fix run_docs.sh in slave_scripts to use "tox -edocs" rather than "tox -evenv ...."

Changed in openstack-ci:
assignee: nobody → Akihiro Motoki (amotoki)
Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
Changed in django-openstack-auth:
assignee: nobody → Akihiro Motoki (amotoki)
Changed in horizon:
importance: Undecided → Medium
Changed in django-openstack-auth:
importance: Undecided → Medium
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/85322

Changed in horizon:
status: New → In Progress
Changed in django-openstack-auth:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to django_openstack_auth (master)

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

Changed in openstack-ci:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config (master)

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

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to django_openstack_auth (master)

Reviewed: https://review.openstack.org/85323
Committed: https://git.openstack.org/cgit/openstack/django_openstack_auth/commit/?id=112f16dd56b29269be7304d49cda7d5faa77b4f9
Submitter: Jenkins
Branch: master

commit 112f16dd56b29269be7304d49cda7d5faa77b4f9
Author: Akihiro Motoki <email address hidden>
Date: Fri Apr 4 20:44:47 2014 +0900

    Add tox env to build docs

    In django-based projects, we need to specify DJANGO_SETTINGS_MODULE
    when running docs build. It is required to addresses the failure of
    docs build job in the gate.

    Change-Id: I33a867bc00c70f333c4dc62add411f833e418424
    Closes-Bug: #1302532

Changed in django-openstack-auth:
status: In Progress → Fix Committed
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to horizon (master)

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

commit c4146c4016cc8d84e7c89ade0b1c1d6221d32ab6
Author: Akihiro Motoki <email address hidden>
Date: Fri Apr 4 20:49:14 2014 +0900

    Add tox env to build docs

    In django-based projects, we need to specify DJANGO_SETTINGS_MODULE
    when running docs build. It is required to addresses the warnings of
    docs build job in the gate.

    This commit also changes run_tests.sh --docs to use "python setup.py
    build_sphinx" to match tox docs env. This change addresses all sphinx
    build warning except keystone v3 related following warning.
    I believe it is useful.
      NoReverseMatch: u'domains' is not a registered namespace
      inside 'horizon:admin'

    Closes-Bug: #1302532
    Related-Bug: #1257725

    Change-Id: I3663b81b58be3c6cb05e4af914f768c28b21ea07

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → juno-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on config (master)

Change abandoned by Akihiro Motoki (<email address hidden>) on branch: master
Review: https://review.openstack.org/85324
Reason: Adding os.environ in doc/source/conf.py solves the problem, so there is no need to this change anymore. When I tested it last time, I didn't work but I must be missing something.

Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

Marking invalid per comment #7. Please re-open if it surfaces again.

Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

Woops, my bad. It appears that the fix has already been released, so no change.

Akihiro Motoki (amotoki)
Changed in django-openstack-auth:
milestone: none → 1.1.6
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-1 → 2014.2
Revision history for this message
Akihiro Motoki (amotoki) wrote :

openstack-infra no longer uses launchpad for bug tracking. Clearing my assignee.

Changed in openstack-ci:
assignee: Akihiro Motoki (amotoki) → nobody
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.