diff --git a/app/config/collections.php b/app/config/collections.php index 8940b6a46c..e5fecaa90d 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -3072,8 +3072,8 @@ $projectCollections = array_merge([ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => true, - 'default' => null, + 'required' => false, + 'default' => [], 'array' => true, 'filters' => [], ], @@ -4795,8 +4795,8 @@ $consoleCollections = array_merge([ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, - 'default' => [], + 'required' => true, + 'default' => null, 'array' => true, 'filters' => [], ], diff --git a/src/Appwrite/Migration/Version/V21.php b/src/Appwrite/Migration/Version/V21.php index fa0f9840c7..8c8d188da5 100644 --- a/src/Appwrite/Migration/Version/V21.php +++ b/src/Appwrite/Migration/Version/V21.php @@ -148,6 +148,7 @@ class V21 extends Migration } catch (\Throwable $th) { Console::warning("'scheduleId' from {$id}: {$th->getMessage()}"); } + break; } usleep(50000); @@ -194,7 +195,7 @@ class V21 extends Migration $bucketId = 'bucket_' . $bucket['$internalId']; try { - $this->projectDB->updateAttribute($bucketId, 'metadata', size: 75000); + $this->projectDB->updateAttribute($bucketId, 'metadata', size: 65534); $this->projectDB->purgeCachedCollection($bucketId); } catch (\Throwable $th) { Console::warning("'bucketId' from {$bucketId}: {$th->getMessage()}"); diff --git a/src/Appwrite/Utopia/Response/Filters/V18.php b/src/Appwrite/Utopia/Response/Filters/V18.php index 6485b6f0ba..0a74a2afed 100644 --- a/src/Appwrite/Utopia/Response/Filters/V18.php +++ b/src/Appwrite/Utopia/Response/Filters/V18.php @@ -16,6 +16,7 @@ class V18 extends Filter Response::MODEL_FUNCTION => $this->parseFunction($content), Response::MODEL_EXECUTION => $this->parseExecution($content), Response::MODEL_PROJECT => $this->parseProject($content), + Response::MODEL_RUNTIME => $this->parseRuntime($content), default => $parsedResponse, }; @@ -37,6 +38,7 @@ class V18 extends Filter protected function parseFunction(array $content) { unset($content['scopes']); + unset($content['specification']); return $content; } @@ -46,4 +48,10 @@ class V18 extends Filter unset($content['authSessionAlerts']); return $content; } + + protected function parseRuntime(array $content) + { + unset($content['key']); + return $content; + } } diff --git a/tests/unit/Utopia/Response/Filters/V18Test.php b/tests/unit/Utopia/Response/Filters/V18Test.php index 5396779b77..ec4ffb68fc 100644 --- a/tests/unit/Utopia/Response/Filters/V18Test.php +++ b/tests/unit/Utopia/Response/Filters/V18Test.php @@ -147,4 +147,29 @@ class V18Test extends TestCase $this->assertEquals($expected, $result); } + + public function runtimeProvider(): array + { + return [ + 'remove key' => [ + [ + 'key' => 'example_key', + ], + [ + ] + ] + ]; + } + + /** + * @dataProvider runtimeProvider + */ + public function testRuntime(array $content, array $expected): void + { + $model = Response::MODEL_RUNTIME; + + $result = $this->filter->parse($content, $model); + + $this->assertEquals($expected, $result); + } }