This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
Investigation into ON_CHANGE actions during nodejs-express APPSODY_PREP #44
Labels
priority/low
Low impact issue
Description:
In some cases, particularly with appsody run for a clean docker for desktop install on Mac Os or when doing:
appsody init-nodejs-express
appsody run
The first time in a new directory on the Che-emulator environment
We will see:
[Container] Running APPSODY_PREP command: npm install --prefix user-app && npm audit fix --prefix user-app
File watch event detected for: FILE "test.js" REMOVE [/project/user-app/test/test.js]
File watch event detected for: FILE "test.js" CREATE [/project/user-app/test/test.js]
It appears that something in the npm commands may cause the watcher to think there is no test.js file (and due to the 1 event per watcher cycle setting we use, it could be more than just test.js)
FYI: The watcher.go code uses filepath.walk() routine to construct a map of files and then compares the map previously obtained on the poll to the current poll's map.
One short term fix that was tested for this would be to run APPSODY_PREP serially before starting the watcher, note this was brought up in another issue, whether we should watch during APPSODY_PREP.
Longer term, we need to investigate why the watcher/commands exhibit this behavior.
It did not appear to happen with Java Microprofile in the che emulator environment.
It seems to happen with nodejs-express on MacOS when there is a clean docker environment every time with the first appsody run. It has been seen a couple of times after long disuse of appsody init/followed by appsody run.
Note that subsequent appsody run's do not see the behavior.
The text was updated successfully, but these errors were encountered: