Bug 843394 - npm modules of nodejs app aren't cleaned after touching force_clean_build marker
npm modules of nodejs app aren't cleaned after touching force_clean_build marker
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Mrunal Patel
libra bugs
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-07-26 04:40 EDT by jizhao
Modified: 2015-05-14 18:57 EDT (History)
1 user (show)

See Also:
Fixed In Version: devenv_1922
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-07 16:42:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description jizhao 2012-07-26 04:40:00 EDT
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):

How reproducible:

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 04:49:29 EDT
Besides, I find 3 "node_modules" dirs in app's home dir, none of which is symbolic link:

Among them, "nodejs-0.6/node_modules/" is always empty. Is is necessary ?
Comment 2 Mrunal Patel 2012-07-27 18:06:53 EDT
Comment 3 jizhao 2012-07-30 04:07:46 EDT
The change is not in devenv_1920. I will test it on the next devenv.
Comment 4 jizhao 2012-07-31 03:59:06 EDT
Verified on INT server.

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