Repository navigation
feat(dns): register friendly account-name alias FQDN (#121 consumer / spore-host#357) - #135
Merged
Merged
Conversation
Completes #121's consumer side: the dns-updater now registers a CNAME {name}.{account-name}.spore.host -> the canonical base36 A-record, so the legible FQDN resolves. base36 stays authoritative (holds the IP); the name is a true alias, updated in one place. Wiring: spored reads the spawn:account-name tag into provider.Config.AccountName -> dns.Client.SetAccountName -> the DNS request's account_name -> the Lambda, which re-validates the slug as an RFC-1035 label (never trust the caller blindly) and upserts/deletes the CNAME alongside the A-record. All best-effort and non-fatal: empty/invalid slug or a failed alias change leaves base36 working. Tests: aliasDNSName validation (rejects spaces, underscores, leading/trailing hyphen, dots). make check + lambda module green.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Add a Substrate-emulator test exercising upsertCNAMERecord/deleteCNAMERecord through the real ChangeResourceRecordSets/ListResourceRecordSets path (create zone, upsert alias CNAME, assert present, delete, assert gone, delete-missing no-op). Closes the patch-coverage gap on the new Route53 helpers with a real behavior test rather than a mock.
scttfrdmn
added a commit
that referenced
this pull request
Jun 13, 2026
* ci: build/vet/test the lambda/* modules (#136) The 11 lambda/* dirs are each their own Go module, so the root `go test ./...` never descended into them — their tests never ran in CI and their code was invisible to codecov. Notably the cost-critical ttl-reaper and the dns-updater Substrate Route53 test (from #135) were unguarded. Add a CI step that loops over lambda/*/go.mod and runs build + vet + test -short in each. Verified all 11 currently pass locally. Closes #136. * fix(lambda): go mod tidy stale modules surfaced by CI (#136) Enabling lambda-module tests in CI immediately caught 4 modules with stale go.mod/go.sum that fail `go build` without -mod=mod: sweep-orchestrator, ttl-reaper, alert-handler, autoscale-orchestrator. Tidy them so the new CI step is green. Exactly the rot the missing CI coverage was hiding.
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.
Completes the consumer side of #121 (the spawn-repo half of #357 — the dns-updater and spored both live here). spawn already tags
spawn:account-name; now the friendly FQDN actually resolves.What
The dns-updater registers a CNAME
{name}.{account-name}.spore.host→ the canonical base36 A-record. Per the design call: base36 stays authoritative (holds the IP, updated in one place); the account-name FQDN is a true alias.Wiring (tag → record)
spawn:account-nametag intoprovider.Config.AccountName(pkg/provider/ec2.go).dns.Client.SetAccountNameincludes it in the DNS API request (account_name).aliasDNSName— never trusts the caller's value blindly, even though it's signed-instance traffic) and upserts/deletes the CNAME alongside the A-record.Degradation (all best-effort, non-fatal)
Empty name / no
account:GetAccountInformation/ invalid slug / a failed alias change → base36-only, exactly as before. The canonical A-record is never blocked by the alias.Tests
aliasDNSNamerejects spaces, underscores, leading/trailing hyphens, and dots (multi-label).make check+ the dns-updater Lambda module both green.Cross-repo note
The umbrella spore-bot display/match sites (
executor.go) construct the FQDN from base36 for show/lookup — they still work (base36 is unchanged). Honoring the account-name form there too is a nice-to-have follow-up on #357, but not required for the FQDN to resolve. Closes the spawn side of #121 / #357.