Dns migration#726
Open
godot wants to merge 1 commit into
Open
Conversation
godot
force-pushed
the
dns-migration
branch
2 times, most recently
from
July 24, 2026 09:39
882bf1d to
580cf08
Compare
New commands for customers migrating instances from the shared AWS stack (partners.platformos.com) to private-stack portals: - dns export: snapshot all domains/DNS records of an instance to a versioned JSON backup (pos-cli/dns-export/v1) - dns migrate <source> <target>: export -> transform -> apply portal-to-portal via /api/domains, then print per-domain cutover instructions (registrar nameservers for domain-full, SSL validation records + CNAME/A targets for domain-external) - dns import --file: apply a saved export (offline --dry-run supported) - dns status: show each domain's provisioning status and pending cutover steps - dns compare: parity verification (OK/ADVISORY/CRITICAL) with expected cross-stack noise normalized (MX case, TXT quoting/chunking, nameservers, data_center); --drop-value mirrors migration-time drops; exit 1 on real drift Safety model: - partners.platformos.com is protected as read-only — only ever a migration source, so a swapped `migrate <target> <source>` fails immediately (--unsafe-allow-protected-target to override) - plan-then-confirm: the plan is displayed and must be confirmed before anything is applied (--yes for scripts/CI; --json refuses a blind interactive confirmation) - a source-export backup is always written before any apply; destructive target updates require --confirm-destructive; worker failures surface as APPLY-FAILED via last_operation_status instead of silent success - exit codes documented: 0 ok / 1 apply errors / 2 transform errors / 3 blocked-only - dns commands never read the ambient PARTNER_PORTAL_HOST env var; scheme-less portal URLs get an actionable error Only customer records move — the target portal re-derives platform DNS (fallback, ACME, www-redirect record) itself. Validated end-to-end on loremup.com (partners.platformos.com -> ps-pos01), including delete -> re-create against Cloudflare's restored-zone behavior (requires the partner-portal TASK-50/51 fixes, deployed 2026-07-23). Bulk cohort mode (--instances-file/--mapping-file) is parked on the dns-migration-bulk branch for a later release. 94 unit tests (vitest + nock) + an env-gated integration test. Work tracked in backlog/ TASK-1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New commands for customers migrating instances from the shared stack to private-stack portals:
(pos-cli/dns-export/v1), bulk via --instances-file
/api/domains, then print per-domain cutover instructions (registrar NS for
domain-full, SSL validation records + CNAME/A targets for domain-external);
source portal is read-only, a backup is always written before any POST;
bulk cohorts via --mapping-file / --instances-file --match-by-domain
offline --dry-run)
TXT quoting/chunking, nameservers, data_center); exit 1 on real drift