Repository navigation
fix(connect): derive the DCV fallback host from the instance, not one account's subdomain - #1203
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
… account's subdomain
cmd/connect.go appended ".c0zxr0ao.spore.host" to every instance's DNS
name. Build {name}.{account-base36}.{zone} from the instance's
spawn:account-id/account-base36 and spawn:dns-domain tags (custom DNS,
string literal in non-test Go code (#1152).
scttfrdmn
force-pushed
the
fix/1152-dcv-dns-host
branch
from
October 20, 2026 00:05
3266954 to
cda7e86
Compare
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.
Fixes #1152
What changed
When
spawn connectto a DCV app had neither a session file nor a ready-url, it fell back todns + ".c0zxr0ao.spore.host": one account's subdomain, for every user. It now calls a puredcvFallbackHost, which builds{spawn:dns-name}.{account-base36}.{zone}:spawn:account-idtag, elsespawn:account-base36. Only if both are missing does it use the caller's account (best-effortGetAccountID).spawn:dns-domain, elsespore.host. This is the same choicespawn dns listmakes, so custom DNS domains (Custom DNS deployments: nothing points spored at the custom domain or endpoint #891) are honoured.Gates (each watched failing against a revert that compiles, with
go vetclean)TestNoHardcodedAccountSubdomain(root package) parses every non-test.gofile in the repo, nested modules included, and fails if fewer than 100 are found. It checks string literals only, so the comments documenting the FQDN shape don't count. Each+chain is flattened and adjacent literals are joined, so"." + "c0zxr0ao" + ".spore.host"is caught too. A candidate\.[0-9a-z]{6,10}\.spore\.hostlabel is confirmed withdns.DecodeAccountID, so a service host likeupdates.spore.hostisn't flagged. Restoring the original line fails it, and so does the split-literal form.TestAccountSubdomainMatcherpins the matcher.TestDCVFallbackHostcovers: a customspawn:dns-domaingivesname.<b36>.prismcloud.host; the default zone; a base36-tag-only instance; the instance's account winning over the caller's; the caller-account fallback; and two IP fallbacks. It fails if the zone tag is ignored orspawn:account-idis skipped.Checks
make check: steps 1-6 pass. Step 7,check-build-tags, fails identically on unmodified main on this machine (/private/tmppaths).make check-docs: clean (no help text changed).semgrep scan --config=auto --error .: 0 findings.Not exercised against a live DCV session.