Repository navigation
feat(dns): tag instances with the account's friendly name (#121) - #134
Merged
Merged
Conversation
Add spawn:account-name — a DNS-safe slug of the AWS account's friendly name
(aws account put-account-name), resolved best-effort at launch via
account.GetAccountInformation on the caller's creds. Lets DNS surface a legible
{name}.{account-name}.spore.host instead of the opaque base36 segment. base36
stays as the canonical/always-present fallback, so nothing breaks when the
account has no name or the caller lacks account:GetAccountInformation (returns
"" → tag omitted).
- GetAccountName + slugifyDNSLabel (RFC-1035 label: lowercase, [a-z0-9-],
collapse runs, trim hyphens, <=63 chars) in pkg/aws/client.go.
- buildTags takes the slug and writes the tag when non-empty.
- Unit tests for slugify (incl. junk/empty/max-length) and the tag presence;
verified live (dev account "Mycelium Development" -> mycelium-development).
The DNS-updater/Route53 + spore-bot side that consumes the tag is #357.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
5 tasks done
scttfrdmn
added a commit
that referenced
this pull request
Aug 10, 2026
truffle v0.49.0 (carrying #133 QuotaInfo.SpotUsage and #134 Capabilities.VCPUs) is now released, so this PR no longer needs the local-path replace directive. go.mod now pins the real tag; verified the full build/test suite (including TestCatalogValid and the new sweep-quota tests) against it, not the local checkout.
scttfrdmn
added a commit
that referenced
this pull request
Aug 10, 2026
…al quota (#493) * feat(launch): --max-concurrent-auto derives sweep concurrency from real quota The sweep orchestrator's wave mechanism (pkg/sweep + lambda/sweep-orchestrator) already polls active-instance count and launches min(available, remaining) -- a real batch/wait-for-room primitive. But its ceiling (state.MaxConcurrent) was always a number the caller had to already know, via --max-concurrent or the arbitrary default-10 fallback when a sweep auto-enables --detach. --max-concurrent-auto queries truffle's quota client for headroom (quota - current usage) per instance family, in the region the sweep is about to launch in, and converts vCPU headroom to an instance count via the real per-type vCPU count (truffle#134's new Capabilities.VCPUs, not a guessed size suffix). A heterogeneous sweep's derived ceiling is the MINIMUM across every distinct (instance type, spot/on-demand) combination present in the sweep, so a scarce family can't be silently outvoted by a roomier one. Real-world motivation: a 10-shard fleet launch with no concurrency guardrail hit an account's real ceiling (a G/VT Spot quota of 64 vCPUs, saturated by 8 running g7e.2xlarge instances) with zero prior warning; the actual launches then failed with MaxSpotInstanceCountExceeded. Not yet wired into `spawn resume`'s equivalent override -- tracked as a follow-up, since resume already has a recorded region and is a smaller retrofit. BLOCKED: go.mod carries a TEMPORARY local replace directive for truffle, since this code depends on truffle#133 (QuotaInfo.SpotUsage) and truffle#134 (Capabilities.VCPUs), both unreleased. Must be resolved to a real tag before merge. Fixes #492. * chore: drop temporary truffle replace, pin real v0.49.0 truffle v0.49.0 (carrying #133 QuotaInfo.SpotUsage and #134 Capabilities.VCPUs) is now released, so this PR no longer needs the local-path replace directive. go.mod now pins the real tag; verified the full build/test suite (including TestCatalogValid and the new sweep-quota tests) against it, not the local checkout.
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.
Adds a
spawn:account-nameinstance tag — a DNS-safe slug of the AWS account's friendly name (set viaaws account put-account-name) — so DNS can surface a legible{name}.{account-name}.spore.hostinstead of the opaque{name}.{base36}.spore.host.How
GetAccountNamecallsaccount.GetAccountInformationon the caller's creds (the user runningspawn launch, not the spored role). Best-effort: returns""on any error (unset name, noaccount:GetAccountInformationpermission, API down).slugifyDNSLabelproduces an RFC-1035 label (lowercase,[a-z0-9-], runs collapse to one hyphen, trimmed, ≤63 chars) or""if it can't.buildTagswritesspawn:account-nameonly when the slug is non-empty.spawn:account-base36stays — always present, canonical — so existing FQDNs never break and the name is purely an alias.Degradation / permissions
No spored-policy change needed (the daemon doesn't call this). A caller lacking
account:GetAccountInformationjust gets base36, silently — no launch failure.Tests
slugifyDNSLabel: snake/space/punct/junk/empty/leading-trailing-hyphen + 63-char cap.buildTags: tag present with a slug, absent without; base36 always present."Mycelium Development"→mycelium-development.Follow-up
The DNS-updater/Route53 + spore-bot side that consumes this tag to register the friendly FQDN is spore-host/spore-host#357.
Closes #121.