From afdf42c4939fa5150647611df7252d5baee550a3 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Wed, 27 May 2026 21:29:48 +0100 Subject: [PATCH 1/2] Fix CodeQL + Greptile review on custom-domains PR - Transfer::extractServices match was missing GROUP_SETTINGS; callers hit the default 'No service group found' branch even though GROUP_SETTINGS_RESOURCES exists. - Destination's redirect-rule fanout called ProxyResourceType::FUNCTION() which the SDK generator renames to FUNCTIONMODEL() because FUNCTION is a PHP reserved keyword. Underlying value is still 'function'. --- src/Migration/Destinations/Appwrite.php | 2 +- src/Migration/Transfer.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Migration/Destinations/Appwrite.php b/src/Migration/Destinations/Appwrite.php index 18be32f117..aa0493ada7 100644 --- a/src/Migration/Destinations/Appwrite.php +++ b/src/Migration/Destinations/Appwrite.php @@ -3360,7 +3360,7 @@ class Appwrite extends Destination $resourceType = $deploymentResourceType === 'site' ? ProxyResourceType::SITE() - : ProxyResourceType::FUNCTION(); + : ProxyResourceType::FUNCTIONMODEL(); $this->proxy->createRedirectRule( $resource->getDomain(), diff --git a/src/Migration/Transfer.php b/src/Migration/Transfer.php index 468a1a75fb..87d318391b 100644 --- a/src/Migration/Transfer.php +++ b/src/Migration/Transfer.php @@ -448,6 +448,7 @@ class Transfer self::GROUP_MESSAGING => array_merge($resources, self::GROUP_MESSAGING_RESOURCES), self::GROUP_BACKUPS => array_merge($resources, self::GROUP_BACKUPS_RESOURCES), self::GROUP_DOMAINS => array_merge($resources, self::GROUP_DOMAINS_RESOURCES), + self::GROUP_SETTINGS => array_merge($resources, self::GROUP_SETTINGS_RESOURCES), default => throw new \Exception('No service group found'), }; } From 0ecc00c1456328fb8e61514795f6fc631242e0a3 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Wed, 27 May 2026 21:34:11 +0100 Subject: [PATCH 2/2] Add GROUP_SETTINGS case to extractServices() The GROUP_SETTINGS const was added in this branch (with project-variable under it) but the extractServices() match was never updated. Any caller passing Transfer::GROUP_SETTINGS hits the 'No service group found' default branch even though GROUP_SETTINGS_RESOURCES is populated. --- src/Migration/Transfer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Migration/Transfer.php b/src/Migration/Transfer.php index 069a780bc8..88b9fb2cb7 100644 --- a/src/Migration/Transfer.php +++ b/src/Migration/Transfer.php @@ -424,6 +424,7 @@ class Transfer self::GROUP_DATABASES_VECTOR_DB => array_merge($resources, self::GROUP_VECTORSDB_RESOURCES), self::GROUP_MESSAGING => array_merge($resources, self::GROUP_MESSAGING_RESOURCES), self::GROUP_BACKUPS => array_merge($resources, self::GROUP_BACKUPS_RESOURCES), + self::GROUP_SETTINGS => array_merge($resources, self::GROUP_SETTINGS_RESOURCES), default => throw new \Exception('No service group found'), }; }