Turning off offline compression for integration test

Bug #1469293 reported by Thai Tran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Thai Tran

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

Changed in horizon:
status: New → In Progress
Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: liberty-2 → 8.0.0
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.