feat(aws): add Capabilities.VCPUs (default vCPU count per instance type) - #134
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Populated from DescribeInstanceTypes' VCpuInfo.DefaultVCpus. Lets a caller (spawn's sweep orchestrator, spawn#492) convert a per-family vCPU quota into an instance-count ceiling without re-implementing pkg/quotas.getVCPUCount's name-based size-suffix parsing, which its own fallback comment already documents as unreliable for non-linear sizes (p6-b200.48xlarge, metal sizes).
scttfrdmn
force-pushed
the
feat/492-export-vcpu-capability
branch
from
August 10, 2026 22:03
3117a40 to
bc7c11c
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.
Summary
Capabilities.VCPUsfield, populated fromDescribeInstanceTypes'VCpuInfo.DefaultVCpus.pkg/quotas.QuotaInfo) into an instance-count ceiling using the real EC2 API value, instead of re-implementingpkg/quotas.getVCPUCount's name-based size-suffix parsing — which is already documented (inobtainability.go) as an unreliable fallback for non-linear sizes.--max-concurrent=autofor the sweep orchestrator), which needs to turn "64 vCPUs of G-family Spot quota" into "8 concurrent g7e.2xlarge" without guessing.Additive, backward-compatible field on an existing exported struct — no behavior change for existing callers.
Test plan
go build ./...,go test ./...(full repo),go vet ./...all greengolangci-lint run ./pkg/aws/...— 0 issuesmake check-fmt,make check-docs,./scripts/verify-pins.shall cleanTestGetCapabilities_Substrateunaffected (Substrate doesn't modelc5n.18xlarge's VCpuInfo, so it can't assert a nonzero value here — verified the field is present and zero-valued when unmodeled, consistent with every other capability bit in that test)