Public bug reported:

We have COMPRESS_OFFLINE disabled by default in our tests in horizon, we need 
to do the same in dashboard.
Here is a very long explanation of why this needs to happen.

What we know about offline compression:
1. You need to manually run "manage.py compress" to generate the offline 
compressed files
2. The offline compressed files are stored in /static/dashboards/
3. There is a manifest file that maps a key to a file
4. The key is generated via some hashing mechanism based on content
5. When page request happens, the compressor looks up the manifest and hands 
over the compressed file
6. If you make changes inside of the {% compress %} tag, you NEED to manually 
rerun the compress cmd in #1

In summary, if you enable COMPRESS_OFFLINE, you need to manually generate the 
compressed files.
If you made changes to your compress tag, you need to rerun the compress 
command.

How is this related to integration test?
a. Integration tests will break if you made changes to the {% compress %} tag 
and did not rerun the compress command
b. The error is obscure and goes something like "OfflineGenerationError" and 
complains about not finding a key (#3)

To avoid future problems, integration tests should not have COMPRESS_OFFLINE 
enabled.
This is a feature for deployers to use for a STABLE environment.

Links:
https://github.com/openstack/horizon/blob/master/horizon/test/settings.py#L143
https://github.com/openstack/horizon/blob/master/openstack_dashboard/test/settings.py

** Affects: horizon
     Importance: Medium
     Assignee: Thai Tran (tqtran)
         Status: In Progress


** Tags: integration-tests

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

Title:
  Turning off offline compression for integration test

Status in OpenStack Dashboard (Horizon):
  In Progress

Bug description:
  We have COMPRESS_OFFLINE disabled by default in our tests in horizon, we need 
to do the same in dashboard.
  Here is a very long explanation of why this needs to happen.

  What we know about offline compression:
  1. You need to manually run "manage.py compress" to generate the offline 
compressed files
  2. The offline compressed files are stored in /static/dashboards/
  3. There is a manifest file that maps a key to a file
  4. The key is generated via some hashing mechanism based on content
  5. When page request happens, the compressor looks up the manifest and hands 
over the compressed file
  6. If you make changes inside of the {% compress %} tag, you NEED to manually 
rerun the compress cmd in #1

  In summary, if you enable COMPRESS_OFFLINE, you need to manually generate the 
compressed files.
  If you made changes to your compress tag, you need to rerun the compress 
command.

  How is this related to integration test?
  a. Integration tests will break if you made changes to the {% compress %} tag 
and did not rerun the compress command
  b. The error is obscure and goes something like "OfflineGenerationError" and 
complains about not finding a key (#3)

  To avoid future problems, integration tests should not have COMPRESS_OFFLINE 
enabled.
  This is a feature for deployers to use for a STABLE environment.

  Links:
  https://github.com/openstack/horizon/blob/master/horizon/test/settings.py#L143
  
https://github.com/openstack/horizon/blob/master/openstack_dashboard/test/settings.py

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to