From dd87cdbebfef58710c55cb8cef50713eeb943c55 Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Sun, 27 Oct 2024 18:04:40 +0100 Subject: [PATCH] Fix remaining vars --- .../Platform/Modules/Functions/Workers/Builds.php | 8 ++++---- .../e2e/Services/Functions/FunctionsCustomServerTest.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 3cfdb64544..97e5170d66 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -526,8 +526,8 @@ class Builds extends Action 'APPWRITE_FUNCTION_PROJECT_ID' => $project->getId(), 'APPWRITE_FUNCTION_RUNTIME_NAME' => $runtime['name'] ?? '', 'APPWRITE_FUNCTION_RUNTIME_VERSION' => $runtime['version'] ?? '', - 'APPWRITE_FUNCTION_CPUS' => $cpus, - 'APPWRITE_FUNCTION_MEMORY' => $memory + 'APPWRITE_COMPUTE_CPUS' => $cpus, + 'APPWRITE_COMPUTE_MEMORY' => $memory ]; break; case 'sites': @@ -539,8 +539,8 @@ class Builds extends Action 'APPWRITE_SITE_PROJECT_ID' => $project->getId(), 'APPWRITE_SITE_RUNTIME_NAME' => $runtime['name'] ?? '', 'APPWRITE_SITE_RUNTIME_VERSION' => $runtime['version'] ?? '', - 'APPWRITE_SITE_CPUS' => $cpus, - 'APPWRITE_SITE_MEMORY' => $memory + 'APPWRITE_COMPUTE_CPUS' => $cpus, + 'APPWRITE_COMPUTE_MEMORY' => $memory ]; break; } diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 9b9f03a100..41b890caf6 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -1090,8 +1090,8 @@ class FunctionsCustomServerTest extends Scope $output = json_decode($execution['body']['responseBody'], true); - $this->assertEquals(1, $output['APPWRITE_FUNCTION_CPUS']); - $this->assertEquals(1024, $output['APPWRITE_FUNCTION_MEMORY']); + $this->assertEquals(1, $output['APPWRITE_COMPUTE_CPUS']); + $this->assertEquals(1024, $output['APPWRITE_COMPUTE_MEMORY']); // Change the specs to 1vcpu 512mb $function = $this->client->call(Client::METHOD_PUT, '/functions/' . $data['functionId'], array_merge([ @@ -1118,8 +1118,8 @@ class FunctionsCustomServerTest extends Scope $output = json_decode($execution['body']['responseBody'], true); - $this->assertEquals(1, $output['APPWRITE_FUNCTION_CPUS']); - $this->assertEquals(512, $output['APPWRITE_FUNCTION_MEMORY']); + $this->assertEquals(1, $output['APPWRITE_COMPUTE_CPUS']); + $this->assertEquals(512, $output['APPWRITE_COMPUTE_MEMORY']); /** * Test for FAILURE