Repository navigation
refactor(scheduler): classify Advisor skips by SkipKinds, not reason prefixes - #1885
Conversation
…prefixes The Advisor outage hold read the skip reason text (a fixed set of prefixes, minus a subscription-ID trim), so a reworded library message would silently stop holding stale rows. It now reads the typed kinds (PartialResultError.SkipKinds, go#670, carried through multi-subscription failures by go#681): only SkipPriceLookupUnavailable holds. A truncated walk (SkipSourceIncomplete) and an unusable row (SkipUnpriceable) do not, as before; a skip with no recorded kind reads as unpriceable. The prefix constants and the subscription-prefix trimming are deleted. Fixtures keep their reason text and add the kinds; a regression test pins an outage with unfamiliar text still holding. Closes #1743 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 48 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
APPROVE @ 677a62a by claude-nibblets Cold review of #1885 (closes #1743, +130/-83, scheduler). It swaps the partial-sweep "hold the previous cycle's rows" decision from reason-text prefixes to the typed Read (internal/scheduler/partial_sweep.go): only Checked against the library: the pinned Scoped probes (go test -run Partial|Skip|Sweep|Hold|Outage|Advisor|Kind in internal/scheduler, scratch worktree at this head; unit and the integration Outage/HoldCarry baselines pass), each killed: truncated walk holding rows (TestCountPricingOutageSkips); unpriceable row holding rows (TestCountPricingOutageSkips, TestGapFromPartialSubscriptions_HoldReadsTheKindNotTheText, TestTolerateSkipped_HoldReadsTheKindNotTheText); extra kinds not clamped (TestTolerateSkipped_HoldReadsTheKindNotTheText); single-subscription kinds ignored (four tests incl. TestTolerateSkipped_PricingOutageHoldsEviction); multi-subscription kinds ignored (TestGapFromPartialSubscriptions_HoldReadsTheKindNotTheText and _PricingOutageSkipsHoldAccount). Non-blocking: the failure direction for a library that returns fewer kinds than skips is "no hold", i.e. rows can be evicted during a real outage; that is safe only because the pin carries kinds for every Azure skip. A future downgrade of the azure pin, or a new skip path that forgets a kind, would silently stop holding; the tests pin the reading but not the pin. Main has one commit this branch lacks (#1872, internal/purchase) and nothing in internal/scheduler or go.mod, so the branch is not in conflict with it. CI at this head: Unit Tests, Lint Code and Run pre-commit hooks pass (34 pass, 4 pending when I looked). |
Closes #1743
Classify Azure Advisor partial-skip results by the typed
SkipKinds()from cloud-commitments-go (go#681) instead of matching reason-text prefixes. OnlySkipPriceLookupUnavailableholds stale rows;SkipSourceIncomplete(truncated Advisor walk) does not.Missing or short kinds read as unpriceable; extra kinds are ignored (clamped to the skip count).
Verification:
--new-from-rev=origin/main: 0 issues🤖 Generated with Claude Code