From 007d6953bfb4ea79f0a68b91597ee1396b8ce84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 19 Sep 2023 09:21:11 +0200 Subject: [PATCH] PR review changes --- app/controllers/api/functions.php | 2 +- app/views/install/compose.phtml | 1 + app/workers/builds.php | 2 +- composer.lock | 24 ++++++++++++------------ 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index a10d7a007f..17b082fe32 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1079,7 +1079,7 @@ App::post('/v1/functions/:functionId/deployments') } $fileExt = new FileExt([FileExt::TYPE_GZIP]); - $fileSizeValidator = new FileSize(App::getEnv('_APP_FUNCTIONS_SIZE_LIMIT', 0)); + $fileSizeValidator = new FileSize(App::getEnv('_APP_FUNCTIONS_SIZE_LIMIT', '30000000')); $upload = new Upload(); // Make sure we handle a single file and multiple files the same way diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index d59f97b9da..9e2878e7a7 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -381,6 +381,7 @@ services: - _APP_FUNCTIONS_BUILD_TIMEOUT - _APP_FUNCTIONS_CPUS - _APP_FUNCTIONS_MEMORY + - _APP_FUNCTIONS_SIZE_LIMIT - _APP_OPTIONS_FORCE_HTTPS - _APP_DOMAIN - _APP_STORAGE_DEVICE diff --git a/app/workers/builds.php b/app/workers/builds.php index 32843df249..62038edc54 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -258,7 +258,7 @@ class BuildsV1 extends Worker } $directorySize = $localDevice->getDirectorySize($tmpDirectory); - $functionsSizeLimit = (int) App::getEnv('_APP_FUNCTIONS_SIZE_LIMIT', 0); + $functionsSizeLimit = (int) App::getEnv('_APP_FUNCTIONS_SIZE_LIMIT', '30000000'); if ($directorySize > $functionsSizeLimit) { throw new Exception('Repository directory size should be less than ' . number_format($functionsSizeLimit / 1048576, 2) . ' MBs.'); } diff --git a/composer.lock b/composer.lock index a9c0e83ca8..a345b65c45 100644 --- a/composer.lock +++ b/composer.lock @@ -4147,16 +4147,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.0", + "version": "1.24.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6" + "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/3510b0a6274cc42f7219367cb3abfc123ffa09d6", - "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", + "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", "shasum": "" }, "require": { @@ -4188,22 +4188,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.1" }, - "time": "2023-09-07T20:46:32+00:00" + "time": "2023-09-18T12:18:02+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.28", + "version": "9.2.29", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef" + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef", - "reference": "7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", "shasum": "" }, "require": { @@ -4260,7 +4260,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.28" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" }, "funding": [ { @@ -4268,7 +4268,7 @@ "type": "github" } ], - "time": "2023-09-12T14:36:20+00:00" + "time": "2023-09-19T04:57:46+00:00" }, { "name": "phpunit/php-file-iterator",