Bug 966961 - force_clean_build marker doesn't work for ruby application
Summary: force_clean_build marker doesn't work for ruby application
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Dan Mace
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-24 12:00 UTC by Gaoyun Pei
Modified: 2015-05-14 23:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-11 04:11:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Gaoyun Pei 2013-05-24 12:00:58 UTC
Description of problem:
After touch force_clean_build marker, it didn't clean the gem packages downloaded before.

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

How reproducible:
Always

Steps to Reproduce:
1. Create a ruby-1.8 or ruby-1.9 app

2. Create the Gemfile files in app's git repo and run "bundle check"
$ cat Gemfile
source 'http://rubygems.org'

gem 'pg'

3. git push the changes, could see pg-0.14.1 is installed
[root@dhcp-8-133 app2]# git push 
[master 6072036] update
 2 files changed, 13 insertions(+), 0 deletions(-)
 create mode 100644 Gemfile
 create mode 100644 Gemfile.lock
Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 430 bytes, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: Stopping Ruby cart
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Running build on Ruby cart
remote: Bundling RubyGems based on Gemfile/Gemfile.lock to repo/vendor/bundle with 'bundle install --deployment'
remote: Fetching source index for http://rubygems.org/
remote: which: no sudo in (/bin:/usr/bin:/usr/sbin)
remote: Installing pg (0.14.1) with native extensions 
remote: Using bundler (1.0.21) 
remote: Your bundle is complete! It was installed into ./vendor/bundle
remote: Starting Ruby cart
To ssh://ac39ca10c46411e2933d22000a93dae2.rhcloud.com/~/git/app2.git/
   3ff1a8e..6072036  master -> master

4. ssh into the app to confirm the package is there
[app2-00.dev.rhcloud.com gems]\> pwd
/var/lib/openshift/ac39ca10c46411e2933d22000a93dae2/app-root/repo/vendor/bundle/ruby/1.8/gems
[app2-00.dev.rhcloud.com gems]\> ls
pg-0.14.1

4. Delete the Gemfile file, touch force_clean_build marker, git push the changes
[root@dhcp-8-133 app2]# gitpush 
[master 2678d48] update
 1 files changed, 0 insertions(+), 3 deletions(-)
 create mode 100644 .openshift/markers/force_clean_build
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 433 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: Stopping Ruby cart
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Saving away previously bundled RubyGems
remote: Running build on Ruby cart
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: Starting Ruby cart
To ssh://ac39ca10c46411e2933d22000a93dae2.rhcloud.com/~/git/app2.git/
   2678d48..e75b75e  master -> master

5. ssh into the app, this package still exists
[app2-00.dev.rhcloud.com pg-0.14.1]\> ls
BSDL		   ext		 LICENSE       Rakefile        README-OS_X.rdoc     sample
ChangeLog	   History.rdoc  Manifest.txt  Rakefile.cross  README.rdoc	    spec
Contributors.rdoc  lib		 POSTGRES      README.ja.rdoc  README-Windows.rdoc


Actual results:
The "pg-0.14.1" files are still there

Expected results:
The force_clean_build marker should work to clean the packages

Additional info:

Comment 2 Gaoyun Pei 2013-05-27 08:00:47 UTC
Test this issue on devenv_3277, it was fixed.

After force_clean_build marker touched, do git push:
[pei@dhcp-8-133 rr]$ git push 
[master 17f1251] test
 1 files changed, 0 insertions(+), 4 deletions(-)
 create mode 100644 .openshift/markers/force_clean_build
 delete mode 100644 Gemfile
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 387 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: Stopping Ruby cart
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Running build on Ruby cart
remote: Starting Ruby cart
To ssh://831652606830247344603136.rhcloud.com/~/git/rr.git/
   41be5cc..17f1251  master -> master

And the gem package was removed:
[rr-00.dev.rhcloud.com 831652606830247344603136]\> ls app-root/repo/
config.ru  Gemfile.lock  public  README.md  tmp


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