Skip to content

Commit fbef812

Browse files
committed
disable git parsing by default #5909 #2182 #5801 #5051 #5696
1 parent de0dec5 commit fbef812

File tree

6 files changed

+11
-49
lines changed

6 files changed

+11
-49
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
## 5.5.0
3+
4+
- bun support #5893 #5774 #5682 #5675 #5777
5+
6+
27
## 5.4.1
38

49
- @pm2/io DeprecationWarning: The util._extend API is deprecated https://github.com/keymetrics/pm2-io-apm/issues/301 @egoroof

constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ var csts = {
5858
CLUSTER_MODE_ID : 'cluster_mode',
5959
FORK_MODE_ID : 'fork_mode',
6060

61+
ENABLE_GIT_PARSING : false,
6162
LOW_MEMORY_ENVIRONMENT : process.env.PM2_OPTIMIZE_MEMORY || false,
6263

6364
MACHINE_NAME : process.env.INSTANCE_NAME || process.env.MACHINE_NAME || process.env.PM2_MACHINE_NAME,

lib/God.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,10 @@ God.executeApp = function executeApp(env, cb) {
233233
cb_called = true
234234

235235
// If vizion enabled run versioning retrieval system
236-
if (proc.pm2_env.vizion !== false && proc.pm2_env.vizion !== "false")
236+
if (cst.ENABLE_GIT_PARSING === true &&
237+
proc.pm2_env.vizion !== false && proc.pm2_env.vizion !== "false") {
237238
God.finalizeProcedure(proc);
239+
}
238240
else
239241
God.notify('online', proc);
240242

lib/Worker.js

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Use of this source code is governed by a license that
44
* can be found in the LICENSE file.
55
*/
6-
const vizion = require('vizion');
76
const eachLimit = require('async/eachLimit');
87
const debug = require('debug')('pm2:worker');
98
const domain = require('domain');
@@ -95,51 +94,6 @@ module.exports = function(God) {
9594
}
9695
};
9796

98-
// Deprecated
99-
var versioningRefresh = function(proc_key, cb) {
100-
var proc = _getProcessById(proc_key.pm2_env.pm_id);
101-
if (!(proc &&
102-
proc.pm2_env &&
103-
(proc.pm2_env.vizion !== false && proc.pm2_env.vizion != "false") &&
104-
proc.pm2_env.versioning &&
105-
proc.pm2_env.versioning.repo_path)) {
106-
return cb();
107-
}
108-
109-
if (proc.pm2_env.vizion_running === true)
110-
{
111-
debug('Vizion is already running for proc id: %d, skipping this round', proc.pm2_env.pm_id);
112-
return cb();
113-
}
114-
115-
proc.pm2_env.vizion_running = true;
116-
var repo_path = proc.pm2_env.versioning.repo_path;
117-
118-
vizion.analyze({
119-
folder: proc.pm2_env.versioning.repo_path
120-
},
121-
function(err, meta) {
122-
if (err != null)
123-
return cb();
124-
125-
proc = _getProcessById(proc_key.pm2_env.pm_id);
126-
127-
if (!(proc &&
128-
proc.pm2_env &&
129-
proc.pm2_env.versioning &&
130-
proc.pm2_env.versioning.repo_path)) {
131-
console.error('Proc not defined anymore or versioning unknown');
132-
return cb();
133-
}
134-
135-
proc.pm2_env.vizion_running = false;
136-
meta.repo_path = repo_path;
137-
proc.pm2_env.versioning = meta;
138-
debug('[PM2][WORKER] %s parsed for versioning', proc.pm2_env.name);
139-
return cb();
140-
});
141-
};
142-
14397
var tasks = function() {
14498
if (God.Worker.is_running === true) {
14599
debug('[PM2][WORKER] Worker is already running, skipping this round');

test/e2e.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if [ "$IS_BUN" = false ]; then
6565
runTest ./test/e2e/internals/wrapped-fork.sh
6666
runTest ./test/e2e/logs/log-json.sh
6767
runTest ./test/e2e/misc/inside-pm2.sh
68-
runTest ./test/e2e/misc/versioning-cmd.sh
68+
#runTest ./test/e2e/misc/versioning-cmd.sh
6969
fi
7070

7171
runTest ./test/e2e/internals/infinite-loop.sh

test/unit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ runUnitTest $D/auto_restart.mocha.js
6969
runUnitTest $D/containerizer.mocha.js
7070
runUnitTest $D/api.mocha.js
7171
runUnitTest $D/lazy_api.mocha.js
72-
runUnitTest $D/version.mocha.js
72+
#runUnitTest $D/version.mocha.js
7373
runUnitTest $D/exp_backoff_restart_delay.mocha.js
7474
runUnitTest $D/api.backward.compatibility.mocha.js
7575
runUnitTest $D/custom_action.mocha.js

0 commit comments

Comments
 (0)