Bug 1024282

Summary: force_clean_build marker does not work for ruby apps
Product: OpenShift Online Reporter: Zhe Wang <zhewang>
Component: ContainersAssignee: Dan McPherson <dmcphers>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: dmcphers, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 03:27:19 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:
Embargoed:

Description Zhe Wang 2013-10-29 10:12:27 UTC
Description of problem:
Given a ruby app (either ruby-1.8 or ruby-1.9), the presence of force_clear_build marker won't force a clean build, i.e., gems won't be reinstalled.

Version-Release number of selected component (if applicable):
INT(devenv_3957)

How reproducible:
always

Steps to Reproduce:
1. create a ruby app (ruby-1.8 or ruby-1.9)
2. install a ref gem with the following Gemfile and Gemfile.lock
<----Gemfile---->

source 'http://rubygems.org'

gem 'ref'
gem 'rack'
gem 'thread-dump'

<--------------->

<----Gemfile.lock---->

GEM
  remote: http://rubygems.org/
  specs:
    rack (1.5.2)
    ref (1.0.5)
    thread-dump (0.0.5)

PLATFORMS
  ruby

DEPENDENCIES
  rack
  ref
  thread-dump


<-------------------->

3. trigger a build

4. create a force_clean_build marker

5. trigger another build

Actual results:
In step 3, the ref gem was installed:

remote: Installing rack (1.5.2)
remote: Installing ref (1.0.5)
remote: Installing thread-dump (0.0.5) with native extensions
remote: Using bundler (1.0.21) 

However, after creating a force_clean_build marker, the ref gem was not reinstalled:

remote: Stopping Ruby cartridge
remote: Waiting for stop to finish
remote: Saving away previously bundled RubyGems
remote: Force clean build enabled - cleaning dependencies
remote: Building git ref 'master', commit 5e38761
remote: Building Ruby cartridge
remote: Restoring previously bundled RubyGems (note: you can commit .openshift/markers/force_clean_build at the root of your repo to force a clean bundle)
remote: Bundling RubyGems based on Gemfile/Gemfile.lock to repo/vendor/bundle with 'bundle install --deployment'
remote: Using rack (1.5.2)
remote: Using ref (1.0.5)
remote: Using thread-dump (0.0.5)
remote: Using bundler (1.0.21) ) 


Expected results:
Gems should be reinstalled with the presence of force_clean_build.

Additional info:

Comment 1 Dan McPherson 2013-10-29 14:27:00 UTC
Sorry there was a dependent change that wasn't in devenv_3957

https://github.com/openshift/origin-server/commit/85d23839c182246d32abcbf428ed97d112189e40


Please try again with the latest.

Comment 2 Zhe Wang 2013-10-30 08:29:46 UTC
Verified in INT(devenv_3965):

remote: Stopping Ruby cartridge
remote: Force clean build enabled - cleaning dependencies
remote: Building git ref 'master', commit 80ac36b
remote: Building Ruby cartridge
remote: Bundling RubyGems based on Gemfile/Gemfile.lock to repo/vendor/bundle with 'bundle install --deployment'
remote: Fetching gem metadata from http://rubygems.org/..........
remote: Installing rack (1.5.2) 
remote: Installing ref (1.0.5) 
remote: Using bundler (1.1.4) 
remote: Your bundle is complete! It was installed into ./vendor/bundle