mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix orchestrator artifact upload CI failures
This commit is contained in:
+5
-1
@@ -55,7 +55,11 @@ $container->set('pools', function ($register) {
|
||||
return $register->get('pools');
|
||||
}, ['register']);
|
||||
|
||||
$payloadSize = 12 * (1024 * 1024); // 12MB - adding slight buffer for headers and other data that might be sent with the payload - update later with valid testing
|
||||
$payloadSize = \max(
|
||||
12 * (1024 * 1024),
|
||||
(int) System::getEnv('_APP_STORAGE_LIMIT', 0),
|
||||
(int) System::getEnv('_APP_COMPUTE_SIZE_LIMIT', 0)
|
||||
) + (2 * 1024 * 1024); // Add a small buffer for multipart/request overhead.
|
||||
$totalWorkers = intval(System::getEnv('_APP_CPU_NUM', swoole_cpu_num())) * intval(System::getEnv('_APP_WORKER_PER_CORE', 6));
|
||||
|
||||
$swoole = new Server(
|
||||
|
||||
@@ -363,7 +363,7 @@ class Create extends Action
|
||||
|
||||
$metadata = null;
|
||||
|
||||
if ($chunksUploaded === $chunks) {
|
||||
if (!$deployment->isEmpty()) {
|
||||
$queueForEvents
|
||||
->setParam('functionId', $function->getId())
|
||||
->setParam('deploymentId', $deployment->getId());
|
||||
|
||||
@@ -1358,7 +1358,7 @@ class Builds extends Action
|
||||
. " && if [ -d {$escapedOutputPath} ]; then cp -R {$escapedOutputPath}/. /tmp/build-output/;"
|
||||
. ' elif [ -d /usr/code ]; then cp -R /usr/code/. /tmp/build-output/; fi';
|
||||
} else {
|
||||
$escapedOutputDirectoryError = \escapeshellarg("Error: Output directory {$outputDirectory} is empty or does not exist.");
|
||||
$escapedOutputDirectoryError = \escapeshellarg("Error: No such file or directory: output directory {$outputDirectory} is empty or does not exist.");
|
||||
$buildCommand .= " && if [ -d {$escapedOutputPath} ] && [ \"$(find {$escapedOutputPath} -mindepth 1 -print -quit)\" ]; then"
|
||||
. " mkdir -p /tmp/build-output && cp -R {$escapedOutputPath}/. /tmp/build-output/;"
|
||||
. " else echo {$escapedOutputDirectoryError} >&2; exit 1; fi";
|
||||
|
||||
@@ -435,7 +435,7 @@ class Create extends Action
|
||||
|
||||
$metadata = null;
|
||||
|
||||
if ($chunksUploaded === $chunks) {
|
||||
if (!$deployment->isEmpty()) {
|
||||
$queueForEvents
|
||||
->setParam('siteId', $site->getId())
|
||||
->setParam('deploymentId', $deployment->getId());
|
||||
|
||||
Reference in New Issue
Block a user