Bug 806482 - jammit asset compression is not taking place with brew built packages
jammit asset compression is not taking place with brew built packages
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity unspecified (vote)
: Unspecified
: --
Assigned To: Mike McCune
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-23 18:24 EDT by Mike McCune
Modified: 2014-09-18 11:32 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-15 14:59:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike McCune 2012-03-23 18:24:17 EDT
We need to add a BuildRequires java so we can avoid these build errors:

+ jammit --config config/assets.yml -f
  Generating Rails assets...
 Jammit Warning: Asset compression disabled -- Java unavailable


eg:

http://download.devel.redhat.com/brewroot/packages/katello/0.1.306/1.el6/data/logs/noarch/build.log
Comment 2 Mike McCune 2012-03-26 12:59:33 EDT
A better and more detailed summary:

In Katello we use a asset (javascript and CSS) compression tool called jammit that greatly reduces the size of the items downloaded when viewing a page.

With this compression we reduce the size of most pages from around 900KB down to  500KB after compression.  We have had this enabled in Katello for quite some time (6mo+) but found out that the compression was not happening with CFSE built in Brew.

This change just adds a simple 'BuildRequires: java' to the katello specfile which is required for our jammit compression routine to actually compress the javascript and css.

very low risk and restores benefits we have in Katello
Comment 3 Mike McCune 2012-03-26 13:25:06 EDT
$ git show 051c33e02e4c35e04279e1c92acda10a33788533
commit 051c33e02e4c35e04279e1c92acda10a33788533
Author: Mike McCune <mmccune@redhat.com>
Date:   Fri Mar 23 15:27:36 2012 -0700

    806482 - BR for java so we can actually run jammit compression
    
    Without this you get:
    
    + jammit --config config/assets.yml -f
      Generating Rails assets...
     Jammit Warning: Asset compression disabled -- Java unavailable

diff --git a/src/katello.spec b/src/katello.spec
index 1eb3383..eb98093 100644
--- a/src/katello.spec
+++ b/src/katello.spec
@@ -105,6 +105,7 @@ BuildRequires:  rubygem(chunky_png)
 BuildRequires:  rubygem(fssm) >= 0.2.7
 BuildRequires:  rubygem(compass) >= 0.11.5
 BuildRequires:  rubygem(compass-960-plugin) >= 0.10.4
+BuildRequires:  java >= 0:1.6.0
 
 %description common
 Common bits for all Katello instances
Comment 5 Lukas Zapletal 2012-03-27 11:38:48 EDT
That was fast :-) Yeah, big benefit. Cool!
Comment 6 Mike McCune 2012-03-28 10:34:51 EDT
easy way to test:

curl -k https://<host>/katello/assets/dashboard.js

if it looks uncompressed you know jammit didn't do its job, scroll through the whole file and if you see nicely formatted code:

...
(function($) {
    function Plot(placeholder, data_, options_, plugins) {
        // data is on the form:
        //   [ series1, series2 ... ]
        // where series is either just the data as [ [x1, y1], [x2, y2], ... ]
        // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
        
        var series = [],
            options = {
                // the color theme used for graphs
                colors: ["#edc240", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"],

then it is FAILS_QA.

but if it looks like a literal wall of text for the entire file (

ckgroundOpacity:0.85},xaxis:{show:null,position:"bottom",mode:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,
max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWi
thAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null,twelveHourClock:false},yaxis:{autoscaleMargin:
0.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#ffffff",symbol:"circle"},line
s:{lineWidth:2,fill:false,fillColor:null,steps:false},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null,align:"left",horizon
tal:false},shadowSize:3},grid:{show:true,aboveData:false,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,labelMargin:5
,axisMargi

then it is good2go
Comment 7 Corey Welton 2012-03-29 13:18:45 EDT
QA Verified -  0.1.307-1.el6
Comment 8 errata-xmlrpc 2012-05-15 14:59:18 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-0665.html

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