You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was unsure how to test this so I didn't make it a PR (you are welcome to make it a PR should you want to). I am happy to do so if you will tell me where/how to test this change. I am not sure that this is the precise change that should be made though or if there are additional changes that would need to be made along side.
steps to reproduce issue
run npm install
run npm run dev
observe that there is a plugin startup message starting example sandbox plugin
press ctl + c to quit the process
observe that there is no plugin stopped message
go into your node_modules to node_modules/@remix-run/dev/dist/devServer_unstable/index.js
change line 139 so that instead of having stdio: "pipe" you have it broken into two lines, one for stdout: "pipe" and one for stdin:"inherit" like so:
again you should see the plugin start message starting example sandbox plugin
again press ctl + c to quit the process
observe that now you see the plugin stop with stopping example sandbox plugin
observe that the main process continues to run until you press ctl + c again.
I am unsure how to solve for the double ctl + c so I don't know that this is the appropriate solution to my issue, but I can at least improve my issue with this change.
(note: the change in the example is in a different location than the change in the branch, this is because the example updates the already installed module)
I would expect that plugins would gracefully shut down before the main process is killed. In the included repro repo I have a plugin that logs on start and logs on end. When I press ctl + c I would expect the child process running the architect plugins to close gracefully and log stopping example sandbox plugin.
Actual Behavior
The main process is killed without graceful shutdown of plugins. This can have various impacts depending on what you are doing in your plugin. It could cause data loss if the plugin interacts with a database. In our case it leaves a dockerode process running till you kill it in docker desktop.
The text was updated successfully, but these errors were encountered:
Reproduction
reproduction
repro repo
proposed fix
Branch with desired changes
I was unsure how to test this so I didn't make it a PR (you are welcome to make it a PR should you want to). I am happy to do so if you will tell me where/how to test this change. I am not sure that this is the precise change that should be made though or if there are additional changes that would need to be made along side.
steps to reproduce issue
npm install
npm run dev
starting example sandbox plugin
ctl + c
to quit the processnode_modules/@remix-run/dev/dist/devServer_unstable/index.js
stdio: "pipe"
you have it broken into two lines, one forstdout: "pipe"
and one forstdin:"inherit"
like so:npm run dev
starting example sandbox plugin
ctl + c
to quit the processstopping example sandbox plugin
ctl + c
again.I am unsure how to solve for the double
ctl + c
so I don't know that this is the appropriate solution to my issue, but I can at least improve my issue with this change.(note: the change in the example is in a different location than the change in the branch, this is because the example updates the already installed module)
System Info
Used Package Manager
npm
Expected Behavior
I would expect that plugins would gracefully shut down before the main process is killed. In the included repro repo I have a plugin that logs on start and logs on end. When I press
ctl + c
I would expect the child process running the architect plugins to close gracefully and logstopping example sandbox plugin
.Actual Behavior
The main process is killed without graceful shutdown of plugins. This can have various impacts depending on what you are doing in your plugin. It could cause data loss if the plugin interacts with a database. In our case it leaves a dockerode process running till you kill it in docker desktop.
The text was updated successfully, but these errors were encountered: