From 5475f42518a56e96b27e86999a618ed5a9493455 Mon Sep 17 00:00:00 2001 From: Marek Hornak <marek@xco.sk> Date: Thu, 10 Sep 2020 07:00:40 +0200 Subject: [PATCH] fix(utils): change default maxBuffer limit to 10MB (#7209) --- .../__snapshots__/artifacts.spec.ts.snap | 9 ++ .../__snapshots__/artifacts.spec.ts.snap | 3 + .../__snapshots__/artifacts.spec.ts.snap | 6 + .../__snapshots__/artifacts.spec.ts.snap | 7 + .../__snapshots__/artifacts.spec.ts.snap | 11 ++ .../__snapshots__/artifacts.spec.ts.snap | 3 + .../gradle/__snapshots__/index.spec.ts.snap | 14 ++ .../mix/__snapshots__/artifacts.spec.ts.snap | 2 + .../__snapshots__/lerna.spec.ts.snap | 12 ++ .../__snapshots__/npm.spec.ts.snap | 4 + .../__snapshots__/pnpm.spec.ts.snap | 4 + .../__snapshots__/yarn.spec.ts.snap | 23 +++ .../__snapshots__/extract.spec.ts.snap | 3 + .../__snapshots__/index.spec.ts.snap | 16 ++ .../__snapshots__/artifacts.spec.ts.snap | 5 + .../__snapshots__/artifacts.spec.ts.snap | 7 + lib/util/exec/exec.spec.ts | 153 ++++++++++++++++-- lib/util/exec/index.ts | 2 + 18 files changed, 269 insertions(+), 15 deletions(-) diff --git a/lib/manager/bundler/__snapshots__/artifacts.spec.ts.snap b/lib/manager/bundler/__snapshots__/artifacts.spec.ts.snap index 86741dfbac..9ba6dcf644 100644 --- a/lib/manager/bundler/__snapshots__/artifacts.spec.ts.snap +++ b/lib/manager/bundler/__snapshots__/artifacts.spec.ts.snap @@ -40,6 +40,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -86,6 +87,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -133,6 +135,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -179,6 +182,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -202,6 +206,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -237,6 +242,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -262,6 +268,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -296,6 +303,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -330,6 +338,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/manager/cargo/__snapshots__/artifacts.spec.ts.snap b/lib/manager/cargo/__snapshots__/artifacts.spec.ts.snap index ef9ee459f6..3bbbb064cd 100644 --- a/lib/manager/cargo/__snapshots__/artifacts.spec.ts.snap +++ b/lib/manager/cargo/__snapshots__/artifacts.spec.ts.snap @@ -27,6 +27,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -49,6 +50,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -83,6 +85,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/manager/cocoapods/__snapshots__/artifacts.spec.ts.snap b/lib/manager/cocoapods/__snapshots__/artifacts.spec.ts.snap index 4e09680e75..30b580dd68 100644 --- a/lib/manager/cocoapods/__snapshots__/artifacts.spec.ts.snap +++ b/lib/manager/cocoapods/__snapshots__/artifacts.spec.ts.snap @@ -48,6 +48,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -89,6 +90,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -118,6 +120,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -154,6 +157,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -206,6 +210,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -270,6 +275,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/manager/composer/__snapshots__/artifacts.spec.ts.snap b/lib/manager/composer/__snapshots__/artifacts.spec.ts.snap index 22c4674395..cd337bf740 100644 --- a/lib/manager/composer/__snapshots__/artifacts.spec.ts.snap +++ b/lib/manager/composer/__snapshots__/artifacts.spec.ts.snap @@ -39,6 +39,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -62,6 +63,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -85,6 +87,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -108,6 +111,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -143,6 +147,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -166,6 +171,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -190,6 +196,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/manager/gomod/__snapshots__/artifacts.spec.ts.snap b/lib/manager/gomod/__snapshots__/artifacts.spec.ts.snap index 623a66b48f..0f45e7d37a 100644 --- a/lib/manager/gomod/__snapshots__/artifacts.spec.ts.snap +++ b/lib/manager/gomod/__snapshots__/artifacts.spec.ts.snap @@ -35,6 +35,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -61,6 +62,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -99,6 +101,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -137,6 +140,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -175,6 +179,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -201,6 +206,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -227,6 +233,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -248,6 +255,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -269,6 +277,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -290,6 +299,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -311,6 +321,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/manager/gradle-wrapper/__snapshots__/artifacts.spec.ts.snap b/lib/manager/gradle-wrapper/__snapshots__/artifacts.spec.ts.snap index 392a4e07f8..e842281010 100644 --- a/lib/manager/gradle-wrapper/__snapshots__/artifacts.spec.ts.snap +++ b/lib/manager/gradle-wrapper/__snapshots__/artifacts.spec.ts.snap @@ -17,6 +17,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -40,6 +41,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -63,6 +65,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/manager/gradle/__snapshots__/index.spec.ts.snap b/lib/manager/gradle/__snapshots__/index.spec.ts.snap index b857070e94..ba8ddd141a 100644 --- a/lib/manager/gradle/__snapshots__/index.spec.ts.snap +++ b/lib/manager/gradle/__snapshots__/index.spec.ts.snap @@ -17,6 +17,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, @@ -40,6 +41,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, @@ -63,6 +65,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, @@ -86,6 +89,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, @@ -109,6 +113,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, @@ -132,6 +137,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, @@ -155,6 +161,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, @@ -339,6 +346,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, @@ -445,6 +453,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, @@ -629,6 +638,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, @@ -672,6 +682,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, @@ -713,6 +724,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, @@ -754,6 +766,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, @@ -817,6 +830,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 60000, }, }, diff --git a/lib/manager/mix/__snapshots__/artifacts.spec.ts.snap b/lib/manager/mix/__snapshots__/artifacts.spec.ts.snap index ae3c992c09..d4cade50af 100644 --- a/lib/manager/mix/__snapshots__/artifacts.spec.ts.snap +++ b/lib/manager/mix/__snapshots__/artifacts.spec.ts.snap @@ -27,6 +27,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -60,6 +61,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/manager/npm/post-update/__snapshots__/lerna.spec.ts.snap b/lib/manager/npm/post-update/__snapshots__/lerna.spec.ts.snap index d8bdcb7ec0..9711c9c845 100644 --- a/lib/manager/npm/post-update/__snapshots__/lerna.spec.ts.snap +++ b/lib/manager/npm/post-update/__snapshots__/lerna.spec.ts.snap @@ -15,6 +15,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -32,6 +33,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -54,6 +56,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -71,6 +74,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -93,6 +97,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -110,6 +115,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -132,6 +138,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -149,6 +156,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -171,6 +179,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -188,6 +197,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -210,6 +220,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -227,6 +238,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/manager/npm/post-update/__snapshots__/npm.spec.ts.snap b/lib/manager/npm/post-update/__snapshots__/npm.spec.ts.snap index 0b5f39e7c6..ca01a58982 100644 --- a/lib/manager/npm/post-update/__snapshots__/npm.spec.ts.snap +++ b/lib/manager/npm/post-update/__snapshots__/npm.spec.ts.snap @@ -20,6 +20,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -37,6 +38,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -61,6 +63,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -83,6 +86,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/manager/npm/post-update/__snapshots__/pnpm.spec.ts.snap b/lib/manager/npm/post-update/__snapshots__/pnpm.spec.ts.snap index e0f6b6898d..7a6094cd1e 100644 --- a/lib/manager/npm/post-update/__snapshots__/pnpm.spec.ts.snap +++ b/lib/manager/npm/post-update/__snapshots__/pnpm.spec.ts.snap @@ -16,6 +16,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -38,6 +39,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -60,6 +62,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -82,6 +85,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/manager/npm/post-update/__snapshots__/yarn.spec.ts.snap b/lib/manager/npm/post-update/__snapshots__/yarn.spec.ts.snap index 117b963fb1..e6f1928aff 100644 --- a/lib/manager/npm/post-update/__snapshots__/yarn.spec.ts.snap +++ b/lib/manager/npm/post-update/__snapshots__/yarn.spec.ts.snap @@ -17,6 +17,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -40,6 +41,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -58,6 +60,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -76,6 +79,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -94,6 +98,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -112,6 +117,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -137,6 +143,7 @@ Array [ "YARN_ENABLE_SCRIPTS": "0", "YARN_HTTP_TIMEOUT": "100000", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -162,6 +169,7 @@ Array [ "YARN_ENABLE_SCRIPTS": "0", "YARN_HTTP_TIMEOUT": "100000", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -182,6 +190,7 @@ Array [ "YARN_ENABLE_SCRIPTS": "0", "YARN_HTTP_TIMEOUT": "100000", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -205,6 +214,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -223,6 +233,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -241,6 +252,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -259,6 +271,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -277,6 +290,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -302,6 +316,7 @@ Array [ "YARN_ENABLE_SCRIPTS": "0", "YARN_HTTP_TIMEOUT": "100000", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -327,6 +342,7 @@ Array [ "YARN_ENABLE_SCRIPTS": "0", "YARN_HTTP_TIMEOUT": "100000", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -347,6 +363,7 @@ Array [ "YARN_ENABLE_SCRIPTS": "0", "YARN_HTTP_TIMEOUT": "100000", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -370,6 +387,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -388,6 +406,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -411,6 +430,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -429,6 +449,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -454,6 +475,7 @@ Array [ "YARN_ENABLE_SCRIPTS": "0", "YARN_HTTP_TIMEOUT": "100000", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -474,6 +496,7 @@ Array [ "YARN_ENABLE_SCRIPTS": "0", "YARN_HTTP_TIMEOUT": "100000", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/manager/pip_setup/__snapshots__/extract.spec.ts.snap b/lib/manager/pip_setup/__snapshots__/extract.spec.ts.snap index a61a5f4029..4316f62fbe 100644 --- a/lib/manager/pip_setup/__snapshots__/extract.spec.ts.snap +++ b/lib/manager/pip_setup/__snapshots__/extract.spec.ts.snap @@ -18,6 +18,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -35,6 +36,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -52,6 +54,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/manager/pip_setup/__snapshots__/index.spec.ts.snap b/lib/manager/pip_setup/__snapshots__/index.spec.ts.snap index eaee9ecdda..c869d5aec3 100644 --- a/lib/manager/pip_setup/__snapshots__/index.spec.ts.snap +++ b/lib/manager/pip_setup/__snapshots__/index.spec.ts.snap @@ -16,6 +16,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -33,6 +34,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -50,6 +52,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -67,6 +70,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 30000, }, }, @@ -345,6 +349,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -362,6 +367,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -379,6 +385,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -396,6 +403,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 30000, }, }, @@ -418,6 +426,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -435,6 +444,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -452,6 +462,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -469,6 +480,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 30000, }, }, @@ -491,6 +503,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -508,6 +521,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -525,6 +539,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -542,6 +557,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 30000, }, }, diff --git a/lib/manager/pipenv/__snapshots__/artifacts.spec.ts.snap b/lib/manager/pipenv/__snapshots__/artifacts.spec.ts.snap index f1f79216b2..50d900323e 100644 --- a/lib/manager/pipenv/__snapshots__/artifacts.spec.ts.snap +++ b/lib/manager/pipenv/__snapshots__/artifacts.spec.ts.snap @@ -28,6 +28,7 @@ Array [ "PATH": "/tmp/path", "PIPENV_CACHE_DIR": "/tmp/renovate/cache/others/pipenv", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -51,6 +52,7 @@ Array [ "PATH": "/tmp/path", "PIPENV_CACHE_DIR": "/tmp/renovate/cache/others/pipenv", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -74,6 +76,7 @@ Array [ "PATH": "/tmp/path", "PIPENV_CACHE_DIR": "/tmp/renovate/cache/others/pipenv", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -97,6 +100,7 @@ Array [ "PATH": "/tmp/path", "PIPENV_CACHE_DIR": "/tmp/renovate/cache/others/pipenv", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -132,6 +136,7 @@ Array [ "PATH": "/tmp/path", "PIPENV_CACHE_DIR": "/tmp/renovate/cache/others/pipenv", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/manager/poetry/__snapshots__/artifacts.spec.ts.snap b/lib/manager/poetry/__snapshots__/artifacts.spec.ts.snap index beddfc1caa..19716fb8ee 100644 --- a/lib/manager/poetry/__snapshots__/artifacts.spec.ts.snap +++ b/lib/manager/poetry/__snapshots__/artifacts.spec.ts.snap @@ -32,6 +32,7 @@ Array [ "POETRY_HTTP_BASIC_ONE_USERNAME": "usernameOne", "POETRY_HTTP_BASIC_TWO_USERNAME": "usernameTwo", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -54,6 +55,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -76,6 +78,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -110,6 +113,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -144,6 +148,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -166,6 +171,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, @@ -188,6 +194,7 @@ Array [ "NO_PROXY": "localhost", "PATH": "/tmp/path", }, + "maxBuffer": 10485760, "timeout": 900000, }, }, diff --git a/lib/util/exec/exec.spec.ts b/lib/util/exec/exec.spec.ts index 969d8e2cce..3bcecea574 100644 --- a/lib/util/exec/exec.spec.ts +++ b/lib/util/exec/exec.spec.ts @@ -87,7 +87,15 @@ describe(`Child process execution wrapper`, () => { inCmd, inOpts: {}, outCmd, - outOpts: [{ cwd, encoding, env: envMock.basic, timeout: 900000 }], + outOpts: [ + { + cwd, + encoding, + env: envMock.basic, + timeout: 900000, + maxBuffer: 10485760, + }, + ], }, ], @@ -100,9 +108,27 @@ describe(`Child process execution wrapper`, () => { inOpts: {}, outCmd: ['echo "begin"', ...outCmd, "echo 'end'"], outOpts: [ - { cwd, encoding, env: envMock.basic, timeout: 900000 }, - { cwd, encoding, env: envMock.basic, timeout: 900000 }, - { cwd, encoding, env: envMock.basic, timeout: 900000 }, + { + cwd, + encoding, + env: envMock.basic, + timeout: 900000, + maxBuffer: 10485760, + }, + { + cwd, + encoding, + env: envMock.basic, + timeout: 900000, + maxBuffer: 10485760, + }, + { + cwd, + encoding, + env: envMock.basic, + timeout: 900000, + maxBuffer: 10485760, + }, ], }, ], @@ -121,6 +147,7 @@ describe(`Child process execution wrapper`, () => { encoding, env: { ...envMock.basic, FOO: 'BAR' }, timeout: 900000, + maxBuffer: 10485760, }, ], }, @@ -134,7 +161,15 @@ describe(`Child process execution wrapper`, () => { inCmd, inOpts: {}, outCmd, - outOpts: [{ cwd, encoding, env: envMock.basic, timeout: 900000 }], + outOpts: [ + { + cwd, + encoding, + env: envMock.basic, + timeout: 900000, + maxBuffer: 10485760, + }, + ], }, ], @@ -146,7 +181,15 @@ describe(`Child process execution wrapper`, () => { inCmd, inOpts: {}, outCmd, - outOpts: [{ cwd, encoding, env: envMock.full, timeout: 900000 }], + outOpts: [ + { + cwd, + encoding, + env: envMock.full, + timeout: 900000, + maxBuffer: 10485760, + }, + ], trustLevel: 'high', }, ], @@ -166,7 +209,13 @@ describe(`Child process execution wrapper`, () => { outOpts: [ dockerPullOpts, dockerRemoveOpts, - { cwd, encoding, env: envMock.basic, timeout: 900000 }, + { + cwd, + encoding, + env: envMock.basic, + timeout: 900000, + maxBuffer: 10485760, + }, ], }, ], @@ -186,7 +235,15 @@ describe(`Child process execution wrapper`, () => { }, }, outCmd, - outOpts: [{ cwd, encoding, env: envMock.filtered, timeout: 900000 }], + outOpts: [ + { + cwd, + encoding, + env: envMock.filtered, + timeout: 900000, + maxBuffer: 10485760, + }, + ], }, ], @@ -214,7 +271,13 @@ describe(`Child process execution wrapper`, () => { outOpts: [ dockerPullOpts, dockerRemoveOpts, - { cwd, encoding, env: envMock.filtered, timeout: 900000 }, + { + cwd, + encoding, + env: envMock.filtered, + timeout: 900000, + maxBuffer: 10485760, + }, ], }, ], @@ -233,6 +296,7 @@ describe(`Child process execution wrapper`, () => { encoding, env: { ...envMock.basic, SELECTED_ENV_VAR: 'Default value' }, timeout: 900000, + maxBuffer: 10485760, }, ], }, @@ -262,6 +326,7 @@ describe(`Child process execution wrapper`, () => { encoding, env: { ...envMock.basic, SELECTED_ENV_VAR: 'Default value' }, timeout: 900000, + maxBuffer: 10485760, }, ], }, @@ -282,7 +347,13 @@ describe(`Child process execution wrapper`, () => { outOpts: [ dockerPullOpts, dockerRemoveOpts, - { cwd, encoding, env: envMock.basic, timeout: 900000 }, + { + cwd, + encoding, + env: envMock.basic, + timeout: 900000, + maxBuffer: 10485760, + }, ], }, ], @@ -302,7 +373,13 @@ describe(`Child process execution wrapper`, () => { outOpts: [ dockerPullOpts, dockerRemoveOpts, - { cwd, encoding, env: envMock.basic, timeout: 900000 }, + { + cwd, + encoding, + env: envMock.basic, + timeout: 900000, + maxBuffer: 10485760, + }, ], }, ], @@ -326,7 +403,13 @@ describe(`Child process execution wrapper`, () => { outOpts: [ dockerPullOpts, dockerRemoveOpts, - { cwd, encoding, env: envMock.basic, timeout: 900000 }, + { + cwd, + encoding, + env: envMock.basic, + timeout: 900000, + maxBuffer: 10485760, + }, ], }, ], @@ -350,7 +433,13 @@ describe(`Child process execution wrapper`, () => { outOpts: [ dockerPullOpts, dockerRemoveOpts, - { cwd, encoding, env: envMock.basic, timeout: 900000 }, + { + cwd, + encoding, + env: envMock.basic, + timeout: 900000, + maxBuffer: 10485760, + }, ], }, ], @@ -379,7 +468,13 @@ describe(`Child process execution wrapper`, () => { outOpts: [ dockerPullOpts, dockerRemoveOpts, - { cwd, encoding, env: envMock.basic, timeout: 900000 }, + { + cwd, + encoding, + env: envMock.basic, + timeout: 900000, + maxBuffer: 10485760, + }, ], }, ], @@ -408,7 +503,35 @@ describe(`Child process execution wrapper`, () => { outOpts: [ dockerPullOpts, dockerRemoveOpts, - { cwd, encoding, env: envMock.basic, timeout: 900000 }, + { + cwd, + encoding, + env: envMock.basic, + timeout: 900000, + maxBuffer: 10485760, + }, + ], + }, + ], + + [ + 'Explicit maxBuffer', + { + execConfig, + processEnv, + inCmd, + inOpts: { + maxBuffer: 1024, + }, + outCmd, + outOpts: [ + { + cwd, + encoding, + env: envMock.basic, + timeout: 900000, + maxBuffer: 1024, + }, ], }, ], diff --git a/lib/util/exec/index.ts b/lib/util/exec/index.ts index 36ea72c407..97392c15fc 100644 --- a/lib/util/exec/index.ts +++ b/lib/util/exec/index.ts @@ -119,6 +119,8 @@ export async function exec( }; // Set default timeout to 15 minutes rawExecOptions.timeout = rawExecOptions.timeout || 15 * 60 * 1000; + // Set default max buffer size to 10MB + rawExecOptions.maxBuffer = rawExecOptions.maxBuffer || 10 * 1024 * 1024; let commands = typeof cmd === 'string' ? [cmd] : cmd; const useDocker = execConfig.binarySource === BinarySource.Docker && docker; -- GitLab