From 467d3396dc4a76c94b35712ee0201f7b37405b51 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Mon, 4 Jan 2021 22:44:57 +0100 Subject: [PATCH] Tweak BuildKit step log limits Signed-off-by: CrazyMax --- dist/index.js | 4 ++++ src/main.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/dist/index.js b/dist/index.js index 6ec37b1..d891649 100644 --- a/dist/index.js +++ b/dist/index.js @@ -518,6 +518,8 @@ const buildx = __importStar(__webpack_require__(295)); const context = __importStar(__webpack_require__(842)); const mexec = __importStar(__webpack_require__(757)); const stateHelper = __importStar(__webpack_require__(647)); +const buildkitStepLogMaxSize = 1024 * 8192; +const buildkitStepLogMaxSpeed = -1; function run() { return __awaiter(this, void 0, void 0, function* () { try { @@ -544,6 +546,8 @@ function run() { yield context.asyncForEach(inputs.driverOpts, (driverOpt) => __awaiter(this, void 0, void 0, function* () { createArgs.push('--driver-opt', driverOpt); })); + createArgs.push('--driver-opt', 'env.BUILDKIT_STEP_LOG_MAX_SIZE=' + buildkitStepLogMaxSize); + createArgs.push('--driver-opt', 'env.BUILDKIT_STEP_LOG_MAX_SPEED=' + buildkitStepLogMaxSpeed); if (inputs.buildkitdFlags) { createArgs.push('--buildkitd-flags', inputs.buildkitdFlags); } diff --git a/src/main.ts b/src/main.ts index d5eb526..c0ba280 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,6 +8,9 @@ import * as context from './context'; import * as mexec from './exec'; import * as stateHelper from './state-helper'; +const buildkitStepLogMaxSize = 1024 * 8192; +const buildkitStepLogMaxSpeed = -1; + async function run(): Promise { try { if (os.platform() !== 'linux') { @@ -38,6 +41,8 @@ async function run(): Promise { await context.asyncForEach(inputs.driverOpts, async driverOpt => { createArgs.push('--driver-opt', driverOpt); }); + createArgs.push('--driver-opt', 'env.BUILDKIT_STEP_LOG_MAX_SIZE=' + buildkitStepLogMaxSize); + createArgs.push('--driver-opt', 'env.BUILDKIT_STEP_LOG_MAX_SPEED=' + buildkitStepLogMaxSpeed); if (inputs.buildkitdFlags) { createArgs.push('--buildkitd-flags', inputs.buildkitdFlags); }