startOrRestart not loading new configuration
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
What's going wrong?
In one of my configurations, I removed the log_type: 'json' parameter. When I ran pm2 startOrRestart {{ pm2_config_file }} --update-env and checked pm2 env {{ process_id }}, I could still see log_type: json was there. My understanding is that startOrRestart should have loaded the changes made to the config file, but none of the logs are reflecting that change. When I run pm2 delete {{ process_id }} && pm2 start {{ pm2_config_file }} I no longer see the log_type parameter in the pm2 env output.
How could we reproduce this issue?
- Create a PM2 config file with
log_type: 'json'present - Run
pm2 env {{ process_id }}to ensurelog-type: jsonis present - Remove
log_type: 'json'from the config file - Run a
pm2 startOrRestartcommand on the config file - Run a
pm2 envcommand to see if thelog_typeparameter is still visible.
Supporting information
$ pm2 report
--- Daemon -------------------------------------------------
pm2d version : 5.3.0
node version : 18.19.0
--- CLI ----------------------------------------------------
local pm2 : 5.3.0
node version : 18.19.0
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with the listed pm2 startOrRestart, pm2 env, delete, and start commands using a configuration that removes log_type. Compare the environment after restart with the environment after delete and start; done means the removed log_type setting no longer appears after startOrRestart. The issue names no source files or tests, so the relevant command entry points will need to be located first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100