Bug 843394 - npm modules of nodejs app aren't cleaned after touching force_clean_build marker
Summary: npm modules of nodejs app aren't cleaned after touching force_clean_build marker
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Mrunal Patel
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-26 08:40 UTC by jizhao
Modified: 2015-05-14 22:57 UTC (History)
1 user (show)

Fixed In Version: devenv_1922
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 20:42:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description jizhao 2012-07-26 08:40:00 UTC
Description of problem:
Create a nodejs-0.6 app, add some modules like "optimist" to the dependencies in package.json and git push all the changes. optimist will be installed. Touch force_clean_build marker, remove "optimist" from package.json and git push. optimist still exists in $OPENSHIFT_GEAR_DIR/repo/node_modules/ and still can be used.

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

How reproducible:
Always

Steps to Reproduce:
1.Create a nodejs-0.6 app
2.Add optimist to dependencies in package.json:
  "dependencies": {
      "optimist": "0.3.4"
  },
3.Add 1 line to <git_repo>/server.js
var argv    = require('optimist').argv;
4.Git push all the changes.
5.Touch force_clean_build marker.
$ touch .openshift/markers/force_clean_build
6.Remove optimist from package.json and git push all the changes.
7.Log in the app using Openshift Shell and check $OPENSHIFT_GEAR_DIR/repo/node_modules/. Check the app.
  
Actual results:
7.optimist still exists under $OPENSHIFT_GEAR_DIR/repo/node_modules/.
The app is still available.

Expected results:
7.optimist should be removed from $OPENSHIFT_GEAR_DIR/repo/node_modules/.
The app should be unavailable because module "optimist" not found.

Additional info:

Comment 1 jizhao 2012-07-26 08:49:29 UTC
Besides, I find 3 "node_modules" dirs in app's home dir, none of which is symbolic link:
app-root/runtime/repo/node_modules/
node_modules/
nodejs-0.6/node_modules/

Among them, "nodejs-0.6/node_modules/" is always empty. Is is necessary ?

Comment 2 Mrunal Patel 2012-07-27 22:06:53 UTC
https://github.com/openshift/crankcase/pull/297

Comment 3 jizhao 2012-07-30 08:07:46 UTC
The change is not in devenv_1920. I will test it on the next devenv.

Comment 4 jizhao 2012-07-31 07:59:06 UTC
Verified on INT server.


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