Repository navigation
feat(task): TaskSpec resources.instance_type pins the exact instance type (#413) - #416
Merged
Merged
Conversation
…type (#413) When resources.instance_type is set, the sizer returns it verbatim and skips candidate search + family/price ranking. For adapters that expose a specific instance type (nf-spawn's ext.instanceType) rather than a cpu/memory request: a family-only hint (t3.medium → families:[t3]) with no cpu/mem would otherwise size to the cheapest in-family type (t3.nano) — a severe regression. Closes #413. Refs #386
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Adds
resources.instance_typeto the TaskSpec: when set, the sizer returns it verbatim and skips candidate search + family/price ranking. Closes #413.Why (found during the nf-spawn migration)
nf-spawn's
ext.instanceTypeis an exact type (defaultt3.medium), and nf-spawn sets no cpu/memory directives. Mapping it to the existingresources.families(the lossy family hint) would givefamilies:[t3]with no cpu/mem → spawn's sizer picks the cheapest t3 = t3.nano (2 vCPU / 0.5 GB). That's a severe silent downsizing for every nf-spawn task. An exact pin is required to migrate nf-spawn without regressing.Behavior
resources.instance_typeset → sizer returns{InstanceType: pin, Family: familyOf(pin), Considered: 1}, finder never consulted. Takes precedence overfamilies/cpu/memory_gib.Testing
TestSize_ExactInstanceTypePin: pin returned verbatim, finder not called (fake errors if consulted), family derived, families/cpu ignored.go buildgreen.Closes #413. Refs #386