Bug 1390760

Summary: Build optional bundle httpclient-cache as part of rh-java-common-httpcomponents-client
Product: Red Hat Software Collections Reporter: Roland Grunberg <rgrunber>
Component: httpcomponents-clientAssignee: Michael Simacek <msimacek>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: high Docs Contact:
Priority: high    
Version: rh-java-commonCC: alkazako, jorton, kanderso, lkuprova, mbenitez, msimacek, nboldt, qe-baseos-apps, sgehwolf
Target Milestone: rc   
Target Release: 2.3   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: rh-java-common-httpcomponents-client-4.3.6-1.4.el7 rh-java-common-httpcomponents-client-4.3.6-1.4.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-15 10:04:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Roland Grunberg 2016-11-01 20:53:42 UTC
(See https://issues.jboss.org/browse/JBDS-4150 for some context on how this came about)

rh-java-common-httpcomponents-client doesn't package httpclient-cache ( See http://pkgs.devel.redhat.com/cgit/rpms/httpcomponents-client/tree/httpcomponents-client.spec?h=rhscl-2.3-rh-java-common-rhel-7#n48 ). The classes from within there are needed and strangely enough were always packaged as part of httpclient itself in Eclipse Orbit ( http://download.eclipse.org/tools/orbit/downloads/drops/R20160520211859/repository/plugins/org.apache.httpcomponents.httpclient_4.3.6.v201511171540.jar ).

I'm filing this to discuss the possibility of enabling the building of that optional package that's currently disabled.

Comment 1 Michael Simacek 2016-11-02 12:21:01 UTC
(In reply to Roland Grunberg from comment #0)
> (See https://issues.jboss.org/browse/JBDS-4150 for some context on how this
> came about)
> 
> rh-java-common-httpcomponents-client doesn't package httpclient-cache ( See
> http://pkgs.devel.redhat.com/cgit/rpms/httpcomponents-client/tree/
> httpcomponents-client.spec?h=rhscl-2.3-rh-java-common-rhel-7#n48 ). The
> classes from within there are needed and strangely enough were always
> packaged as part of httpclient itself in Eclipse Orbit (
> http://download.eclipse.org/tools/orbit/downloads/drops/R20160520211859/
> repository/plugins/org.apache.httpcomponents.httpclient_4.3.6.v201511171540.
> jar ).
> 
> I'm filing this to discuss the possibility of enabling the building of that
> optional package that's currently disabled.

httpclient-cache supports multiple backends - default (in-memory), ehcache and memcached. Including httpclient-cache with only the default backend would be easy (doesn't require additional dependencies) and low risk (additive change only).

Including ehcache backend would require packaging (at least) ehcache-core (with hibenate support patched out, otherwise it would pull in tens of packages), rmic-maven-plugin (would go into rh-maven33), ehcache-sizeof-agent, ehcache-parent (probably can be omitted).

Including memcached backend would require packaging (at least) spymemcached (would require to be patched to not depend on spring and metrics, otherwise would pull in tens of packages).

The JAR from Orbit includes all backends. I need to know whether we can build only the default backend and omit ehcache and memcached.

Scratch build with the module enabled:
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=12002862

Comment 2 Roland Grunberg 2016-11-02 19:25:11 UTC
According to Gorkem (who maintains the plugin affected by this issue) :

"Thym has its own HttpCacheStorage implementation it is not using any of the ready backends so my guess is default should be sufficient..."

From my initial testing, simply ensuring the httpclient-cache.jar (from scratch build) is present in the OSGi runtime, and adding 'org.apache.http.client.cache,org.apache.http.client.cache' to the Import-Package statements of org.eclipse.thym.core_2.0.0.201607041526.jar was enough to fix this.

If this change can be made, it will solve this issue.

Comment 3 Roland Grunberg 2016-11-02 21:06:26 UTC
If we can get a build into brew before end of tomorrow, that would be really great.

Comment 4 Nick Boldt 2016-11-02 21:13:16 UTC
Reason for the greatness is that tomorrow (Thurs Nov 3) is the AM3 code freeze for devstudio 10.2, after which I plan to cut a build for QE to test on Mon-Tues and which we'll release on Wed.

We still have ONE 3-week sprint after that to continue to fix these types of problems before the devstudio GA freeze (on Nov 24), but obviously sooner is better as it'll get more testing that way.

Comment 9 errata-xmlrpc 2016-11-15 10:04:11 UTC
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.

https://rhn.redhat.com/errata/RHBA-2016-2727.html