Bug 972878 - CSS in the site is not invalidated when versions change
CSS in the site is not invalidated when versions change
Product: OKD
Classification: Red Hat
Component: Website (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Clayton Coleman
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-06-10 13:42 EDT by Clayton Coleman
Modified: 2015-05-14 21:23 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-06-24 10:46:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Clayton Coleman 2013-06-10 13:42:58 EDT
We may need a way to path prefix assets in production (or move assets completely off the main production servers) so that we can properly generate unique URLs representing a version and globally invalidate them in the community.

May require operational changes to fix.
Comment 1 Clayton Coleman 2013-06-12 16:57:59 EDT
Fixed in https://github.com/openshift/li/pull/1620
Comment 2 openshift-github-bot 2013-06-14 14:02:45 EDT
Commit pushed to master at https://github.com/openshift/li

Bug 972878 - More effectively cache assets for the site and community.

Allow the site and Drupal to serve two separate sets of assets (which means double loading) but ensure that CSS can be cleanly versioned during updates.
Add a config page in Drupal to set the openshift_assets_version variable
Use the openshift_assets_version variable in the theme to prefix the load path
Change the devenv to allow /app/assets-*/ to be rewritten to /app/assets/ (for cache busting)
Added release ticket changes to 2.0.29 to support this

After these changes are applied, console will always serve digest resources, and Drupal will always load from the prefixed path.
Comment 3 Clayton Coleman 2013-06-17 16:00:37 EDT
Release ticket is updated and changes are in devenv.
Comment 4 Yujie Zhang 2013-06-18 02:57:28 EDT
Tested on devenv_3375, cheked the code, the openshift_assets_version variable is used in the theme to prefix the load path, as following:

sites/all/themes/openshift-theme/template.php:    $asset_version = variable_get('openshift_assets_version');

The devenv has /app/assets/ for all the  assets.

Ran "cd /usr/share/drupal6; drush variable-set openshift_assets_version "$(date +%Y%m%d)$(date +%H%M%S)"", the openshift_assets_version can be set as following:

[root@ip-10-165-41-19 drupal6]# drush variable-set openshift_assets_version "$(date +%Y%m%d)$(date +%H%M%S)"
openshift_assets_version was set to 20130618022706.                  [success]

So verify this bug, thanks.

Note You need to log in before you can comment on or make changes to this bug.