From b614045d97fd99b0ddee5e08b672f3f91862cf9f Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Tue, 30 Sep 2025 18:08:49 +0400 Subject: [PATCH 1/7] fix(builds-worker): Use outputDirectory attribute from deployment or resource --- src/Appwrite/Platform/Modules/Functions/Workers/Builds.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index ce45d6b629..9fcf64814c 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -692,9 +692,11 @@ class Builds extends Action // Start separation, enter build folder $listFilesCommand .= 'echo "{APPWRITE_DETECTION_SEPARATOR_START}" && cd /usr/local/build'; + $outputDirectory = $deployment->getAttribute('outputDirectory') ?? $resource->getAttribute('outputDirectory'); + // Enter output directory, if set - if (!empty($resource->getAttribute('outputDirectory', ''))) { - $listFilesCommand .= ' && cd ' . \escapeshellarg($resource->getAttribute('outputDirectory', '')); + if ($outputDirectory !== null) { + $listFilesCommand .= ' && cd ' . \escapeshellarg($resource->getAttribute('outputDirectory')); } // Print files, and end separation From 04d66938037f03c5c695703c3b5679bc66c8b28e Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Tue, 30 Sep 2025 18:10:53 +0400 Subject: [PATCH 2/7] Fix output directory path validation and position --- src/Appwrite/Platform/Modules/Functions/Workers/Builds.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 9fcf64814c..f4b5056bb2 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -692,10 +692,9 @@ class Builds extends Action // Start separation, enter build folder $listFilesCommand .= 'echo "{APPWRITE_DETECTION_SEPARATOR_START}" && cd /usr/local/build'; - $outputDirectory = $deployment->getAttribute('outputDirectory') ?? $resource->getAttribute('outputDirectory'); - // Enter output directory, if set - if ($outputDirectory !== null) { + $outputDirectory = $deployment->getAttribute('outputDirectory') ?? $resource->getAttribute('outputDirectory'); + if (!empty($outputDirectory)) { $listFilesCommand .= ' && cd ' . \escapeshellarg($resource->getAttribute('outputDirectory')); } From 4b985441123a19e61d5a0926a7f06edcf9fc1258 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Tue, 30 Sep 2025 18:31:37 +0400 Subject: [PATCH 3/7] Move outputDirectory initialization before conditional flow --- src/Appwrite/Platform/Modules/Functions/Workers/Builds.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index f4b5056bb2..fcbaf1acb1 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -686,6 +686,7 @@ class Builds extends Action if ($version === 'v2') { $command = 'tar -zxf /tmp/code.tar.gz -C /usr/code && cd /usr/local/src/ && ./build.sh'; } else { + $outputDirectory = $deployment->getAttribute('outputDirectory') ?? $resource->getAttribute('outputDirectory'); if ($resource->getCollection() === 'sites') { $listFilesCommand = ''; @@ -693,7 +694,6 @@ class Builds extends Action $listFilesCommand .= 'echo "{APPWRITE_DETECTION_SEPARATOR_START}" && cd /usr/local/build'; // Enter output directory, if set - $outputDirectory = $deployment->getAttribute('outputDirectory') ?? $resource->getAttribute('outputDirectory'); if (!empty($outputDirectory)) { $listFilesCommand .= ' && cd ' . \escapeshellarg($resource->getAttribute('outputDirectory')); } @@ -726,7 +726,7 @@ class Builds extends Action destination: APP_STORAGE_BUILDS . "/app-{$project->getId()}", variables: $vars, command: $command, - outputDirectory: $resource->getAttribute('outputDirectory', '') + outputDirectory: $outputDirectory ?? '' ); Console::log('createRuntime finished'); From debdfeedf1bd35b8797384d2e6e9b22472050493 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Tue, 30 Sep 2025 18:33:22 +0400 Subject: [PATCH 4/7] Fix variable reference in function build command --- src/Appwrite/Platform/Modules/Functions/Workers/Builds.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index fcbaf1acb1..e042099a97 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -695,7 +695,7 @@ class Builds extends Action // Enter output directory, if set if (!empty($outputDirectory)) { - $listFilesCommand .= ' && cd ' . \escapeshellarg($resource->getAttribute('outputDirectory')); + $listFilesCommand .= ' && cd ' . \escapeshellarg($outputDirectory); } // Print files, and end separation From b7604a5742d63863fc0ec00255d26b02eb858614 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Tue, 30 Sep 2025 19:51:17 +0400 Subject: [PATCH 5/7] Fix buildOutput attribute name in deployment check --- src/Appwrite/Platform/Modules/Functions/Workers/Builds.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index e042099a97..d6385c1f40 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -686,7 +686,7 @@ class Builds extends Action if ($version === 'v2') { $command = 'tar -zxf /tmp/code.tar.gz -C /usr/code && cd /usr/local/src/ && ./build.sh'; } else { - $outputDirectory = $deployment->getAttribute('outputDirectory') ?? $resource->getAttribute('outputDirectory'); + $outputDirectory = $deployment->getAttribute('buildOutput') ?? $resource->getAttribute('outputDirectory'); if ($resource->getCollection() === 'sites') { $listFilesCommand = ''; From 3dd099bd9476cd46f86dc3b85255a884fed1603c Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 1 Oct 2025 17:05:12 +1300 Subject: [PATCH 6/7] Update database for nested selection fix --- composer.lock | 73 +++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/composer.lock b/composer.lock index f5a8c43b32..ab8887de49 100644 --- a/composer.lock +++ b/composer.lock @@ -2596,16 +2596,16 @@ }, { "name": "symfony/http-client", - "version": "v7.3.3", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "333b9bd7639cbdaecd25a3a48a9d2dcfaa86e019" + "reference": "4b62871a01c49457cf2a8e560af7ee8a94b87a62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/333b9bd7639cbdaecd25a3a48a9d2dcfaa86e019", - "reference": "333b9bd7639cbdaecd25a3a48a9d2dcfaa86e019", + "url": "https://api.github.com/repos/symfony/http-client/zipball/4b62871a01c49457cf2a8e560af7ee8a94b87a62", + "reference": "4b62871a01c49457cf2a8e560af7ee8a94b87a62", "shasum": "" }, "require": { @@ -2672,7 +2672,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.3.3" + "source": "https://github.com/symfony/http-client/tree/v7.3.4" }, "funding": [ { @@ -2692,7 +2692,7 @@ "type": "tidelift" } ], - "time": "2025-08-27T07:45:05+00:00" + "time": "2025-09-11T10:12:26+00:00" }, { "name": "symfony/http-client-contracts", @@ -3635,16 +3635,16 @@ }, { "name": "utopia-php/database", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "24c4519b4ac32aee13af31dddd984db2a3b34980" + "reference": "7ec0238bf0197a38c66f392c65355d5e7eed8248" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/24c4519b4ac32aee13af31dddd984db2a3b34980", - "reference": "24c4519b4ac32aee13af31dddd984db2a3b34980", + "url": "https://api.github.com/repos/utopia-php/database/zipball/7ec0238bf0197a38c66f392c65355d5e7eed8248", + "reference": "7ec0238bf0197a38c66f392c65355d5e7eed8248", "shasum": "" }, "require": { @@ -3685,9 +3685,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/1.5.0" + "source": "https://github.com/utopia-php/database/tree/1.5.1" }, - "time": "2025-09-18T14:42:01+00:00" + "time": "2025-10-01T03:51:58+00:00" }, { "name": "utopia-php/detector", @@ -5004,16 +5004,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.4.0", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "3583fa6fddb1d1a902b37ff2048527a5827fc008" + "reference": "07a7d6276bd684b49469ad7b9e8c3c962121c6fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/3583fa6fddb1d1a902b37ff2048527a5827fc008", - "reference": "3583fa6fddb1d1a902b37ff2048527a5827fc008", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/07a7d6276bd684b49469ad7b9e8c3c962121c6fd", + "reference": "07a7d6276bd684b49469ad7b9e8c3c962121c6fd", "shasum": "" }, "require": { @@ -5049,9 +5049,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.4.0" + "source": "https://github.com/appwrite/sdk-generator/tree/1.4.2" }, - "time": "2025-09-23T02:27:10+00:00" + "time": "2025-10-01T03:23:04+00:00" }, { "name": "doctrine/annotations", @@ -7497,16 +7497,16 @@ }, { "name": "symfony/console", - "version": "v7.3.3", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "cb0102a1c5ac3807cf3fdf8bea96007df7fdbea7" + "reference": "2b9c5fafbac0399a20a2e82429e2bd735dcfb7db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/cb0102a1c5ac3807cf3fdf8bea96007df7fdbea7", - "reference": "cb0102a1c5ac3807cf3fdf8bea96007df7fdbea7", + "url": "https://api.github.com/repos/symfony/console/zipball/2b9c5fafbac0399a20a2e82429e2bd735dcfb7db", + "reference": "2b9c5fafbac0399a20a2e82429e2bd735dcfb7db", "shasum": "" }, "require": { @@ -7571,7 +7571,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.3" + "source": "https://github.com/symfony/console/tree/v7.3.4" }, "funding": [ { @@ -7591,7 +7591,7 @@ "type": "tidelift" } ], - "time": "2025-08-25T06:35:40+00:00" + "time": "2025-09-22T15:31:00+00:00" }, { "name": "symfony/filesystem", @@ -8134,16 +8134,16 @@ }, { "name": "symfony/process", - "version": "v7.3.3", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "32241012d521e2e8a9d713adb0812bb773b907f1" + "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/32241012d521e2e8a9d713adb0812bb773b907f1", - "reference": "32241012d521e2e8a9d713adb0812bb773b907f1", + "url": "https://api.github.com/repos/symfony/process/zipball/f24f8f316367b30810810d4eb30c543d7003ff3b", + "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b", "shasum": "" }, "require": { @@ -8175,7 +8175,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.3.3" + "source": "https://github.com/symfony/process/tree/v7.3.4" }, "funding": [ { @@ -8195,20 +8195,20 @@ "type": "tidelift" } ], - "time": "2025-08-18T09:42:54+00:00" + "time": "2025-09-11T10:12:26+00:00" }, { "name": "symfony/string", - "version": "v7.3.3", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "17a426cce5fd1f0901fefa9b2a490d0038fd3c9c" + "reference": "f96476035142921000338bad71e5247fbc138872" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/17a426cce5fd1f0901fefa9b2a490d0038fd3c9c", - "reference": "17a426cce5fd1f0901fefa9b2a490d0038fd3c9c", + "url": "https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872", + "reference": "f96476035142921000338bad71e5247fbc138872", "shasum": "" }, "require": { @@ -8223,7 +8223,6 @@ }, "require-dev": { "symfony/emoji": "^7.1", - "symfony/error-handler": "^6.4|^7.0", "symfony/http-client": "^6.4|^7.0", "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", @@ -8266,7 +8265,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.3.3" + "source": "https://github.com/symfony/string/tree/v7.3.4" }, "funding": [ { @@ -8286,7 +8285,7 @@ "type": "tidelift" } ], - "time": "2025-08-25T06:35:40+00:00" + "time": "2025-09-11T14:36:48+00:00" }, { "name": "textalk/websocket", From b1757250d1960c3dc3f659808edccc62bb5285ab Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 1 Oct 2025 17:47:42 +1300 Subject: [PATCH 7/7] Fix update --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index ab8887de49..95288fc01d 100644 --- a/composer.lock +++ b/composer.lock @@ -3639,12 +3639,12 @@ "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "7ec0238bf0197a38c66f392c65355d5e7eed8248" + "reference": "56efe4daaf23abb753553acffccdcc04cd6178c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/7ec0238bf0197a38c66f392c65355d5e7eed8248", - "reference": "7ec0238bf0197a38c66f392c65355d5e7eed8248", + "url": "https://api.github.com/repos/utopia-php/database/zipball/56efe4daaf23abb753553acffccdcc04cd6178c9", + "reference": "56efe4daaf23abb753553acffccdcc04cd6178c9", "shasum": "" }, "require": { @@ -3687,7 +3687,7 @@ "issues": "https://github.com/utopia-php/database/issues", "source": "https://github.com/utopia-php/database/tree/1.5.1" }, - "time": "2025-10-01T03:51:58+00:00" + "time": "2025-10-01T04:44:14+00:00" }, { "name": "utopia-php/detector",