Repository navigation
fix(scheduler): exempt Savings Plans from the min-count filter - #1150
Conversation
A Savings Plans rec carries Count 1 because the commitment is dollar-denominated, not an instance count, so any positive per-service min_count dropped every SP rec. Skip the floor for SP services, matching the cloud-commitments-go scorer (common.IsSavingsPlan / CommitmentSavingsPlan). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The settings card still showed a plain min-count field for the SP services although the backend now ignores it for them. Closes #1146 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge gate at
|
|
Combined check before merge: current main ( |
Summary
Closes #1146
Owner decision (2026-10-20): Savings Plans are exempt from the per-service min-count filter. A Savings Plan recommendation's
Countis always 1 and is not an instance count. This matches cloud-commitments-go#536 (the scorer exemptsCommitmentSavingsPlan) and the CLI change, so the GUI, CLI and scorer agree.12bd41d9fix(scheduler):filterRecsByResolvedConfigsskipsmeetsMinCountwhencommon.IsSavingsPlan(common.ServiceType(rec.Service))is true. That existing library helper covers the umbrellasavingsplansslug (also Azure's) and the foursavings-plans-*slugs.config.RecommendationRecordhas no commitment type field, so service-based classification is the closest match to the scorer's rule.ed48b78dfix(frontend): Savings Plans service cards label the field "Min count (not applied to Savings Plans)". The field stays visible because hiding it would make the next save overwrite a storedmin_countwith 0.Tests
TestFilterRecsByResolvedConfigs_MinCount_ExemptsSavingsPlanscovers six Savings Plans service types (awssavingsplansandsavings-plans-compute,-ec2instance,-sagemakerand-database, plus azuresavingsplans). Each has Count 1 under MinCount 5 and is kept. An awsec2rec with Count 1 is dropped. With the exemption removed, all six Savings Plans subtests fail.serviceFilters.test.tschecks the Savings Plans label and that other services keep the old one.Verification evidence is posted as PR comments.
🤖 Generated with Claude Code
Summary by CodeRabbit