Add Custom Domains migration#188
Conversation
Greptile SummaryThis PR adds custom-domain proxy rule migration support: a new
Confidence Score: 4/5Mostly safe, but Transfer.php still has a gap where GROUP_SETTINGS cannot be expanded via extractServices(), which will throw for any caller using that group. The domains migration logic itself is well-structured, but GROUP_SETTINGS remains absent from extractServices() even though this PR correctly added GROUP_DOMAINS. Since GROUP_SETTINGS_RESOURCES is now fully populated, any caller passing GROUP_SETTINGS to extractServices() hits the default throw branch — a real defect on the changed path in Transfer.php. src/Migration/Transfer.php — the extractServices() match expression is missing GROUP_SETTINGS. Important Files Changed
Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/add..." | Re-trigger Greptile |
…tom-domains-migration
| self::GROUP_BACKUPS => array_merge($resources, self::GROUP_BACKUPS_RESOURCES), | ||
| self::GROUP_DOMAINS => array_merge($resources, self::GROUP_DOMAINS_RESOURCES), | ||
| default => throw new \Exception('No service group found'), |
There was a problem hiding this comment.
GROUP_SETTINGS still missing from extractServices()
GROUP_DOMAINS was added to the extractServices() match expression in this PR, but GROUP_SETTINGS is still absent. Any caller that passes Transfer::GROUP_SETTINGS to extractServices() will hit the default branch and throw \Exception('No service group found'), making the entire settings group unexpandable through this method even though GROUP_SETTINGS_RESOURCES is fully populated.
Summary
Resource::TYPE_RULEfor migrating custom-domain proxy rules.Sources/Appwrite) lists rules via the console SDK'sProxyservice, paginated with cursor.Destinations/Appwrite) dispatches to the SDK's four proxy-rule create endpoints (createAPIRule,createFunctionRule,createSiteRule,createRedirectRule) based on the rule'stype+deploymentResourceType..appwrite.networkrules are skipped — they're recreated automatically when the parent Function/Site is migrated.STATUS_WARNINGrather than aborting the migration, since the source must release the domain first.exportGroupDomainsin Firebase / NHost / JSON / CSV sources to satisfy the new abstract method.Test plan
testAppwriteMigrationCustomDomains(in appwrite/appwrite) passes