← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1643964] Re: compressing static assets fails with xstatic-bootswatch 3.3.7.0

 

I've reduced the steps to reproduce down to:

  apt-get update
  apt install git python-pip
  git clone https://github.com/openstack/horizon.git
  git clone https://github.com/openstack/requirements.git
  cd horizon
  git checkout 11.0.0.0b1
  pip install . -c ../requirements/upper-constraints.txt
  mkdir /usr/share/openstack-dashboard
  mkdir /var/lib/openstack-dashboard
  cp manage.py /usr/share/openstack-dashboard/manage.py
  mkdir /etc/openstack-dashboard
  cp ./openstack_dashboard/local/local_settings.py.example /etc/openstack-dashboard/local_settings.py
  rsync -avrz ./openstack_dashboard/ /usr/share/openstack-dashboard/openstack_dashboard/
* ln -s /usr/share/openstack-dashboard/openstack_dashboard/static /usr/share/openstack-dashboard/static
  ln -s /etc/openstack-dashboard/local_settings.py /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py
* ln -s /usr/local/lib/python2.7/dist-packages/horizon/static/horizon/  /usr/share/openstack-dashboard/openstack_dashboard/static/horizon
  python /usr/share/openstack-dashboard/manage.py collectstatic --noinput
  python /usr/share/openstack-dashboard/manage.py compress --force

Which, you might note, already has the settings.py copy command removed
(that file is ignored). When I remove the spurious links (marked *
above) the compress works as intended. Those links are not necessary to
the correct collection of static files, and in fact confuse the heck out
of things.

** Changed in: horizon
       Status: Triaged => Invalid

** Changed in: xstatic-bootswatch
       Status: New => Invalid

-- 
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/1643964

Title:
  compressing static assets fails with xstatic-bootswatch 3.3.7.0

Status in OpenStack Dashboard (Horizon):
  Invalid
Status in XStatic-bootswatch:
  Invalid

Bug description:
  While packaging horizon for ocata milestone 1, we are hitting the
  following error while compressing static assets:

  CommandError: An error occurred during rendering /usr/share/openstack-dashboard/openstack_dashboard/templates/horizon/_scripts.html: '\"../bower_components/respond/dest/respond.min.js\"' isn't accessible via COMPRESS_URL ('/horizon/static/') and can't be compressed
  dpkg: error processing package openstack-dashboard (--configure):
   subprocess installed post-installation script returned error exit status 1
  dpkg: dependency problems prevent configuration of autopkgtest-satdep:
   autopkgtest-satdep depends on openstack-dashboard (>= 0~); however:
    Package openstack-dashboard is not configured yet.

  dpkg: error processing package autopkgtest-satdep (--configure):
   dependency problems - leaving unconfigured
  dpkg: dependency problems prevent configuration of openstack-dashboard-ubuntu-theme:
   openstack-dashboard-ubuntu-theme depends on openstack-dashboard (= 3:11.0.0~b1-0ubuntu1); however:
    Package openstack-dashboard is not configured yet.

  Paste of above error:
  http://pastebin.ubuntu.com/23513344/

  The 3.3.7.0 release of xstatic-bootswatch includes lines such as:
  <script src="../bower_components/respond/dest/respond.min.js"></script>

  which corresponds to the file in the compression error.

  Link to 3.3.7.0 commit of xstatic-bootswatch:
  https://github.com/openstack/xstatic-bootswatch/commit/49c0d56698bc14ae5e5c18cc00c3f2e290d2e724

  We currently have the following django and compressor versions in zesty:
  python-django            | 1.8.7-1ubuntu9    | zesty            | source, all
  python-django-compressor | 2.0-3ubuntu1      | zesty            | source, all

  which are within the bounds of global-requirements and upper-constraints:
  http://paste.ubuntu.com/23517114/

  I also attempted using newer versions of django and compressor, with the same results:
  http://paste.ubuntu.com/23517443/
  http://paste.ubuntu.com/23517845/

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


References