fix(aws): request daily reservation coverage by instance filter - #160
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: LeanerCloud/cloud-commitments-go/.coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughDaily usage history now filters reservation coverage by service, region, and instance type. The request omits grouping and retains daily granularity. The result mapping reads each period’s total coverage percentage and skips periods missing a start date or total. ChangesAWS daily usage history
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change corrects daily coverage requests while preserving ordered usage history and existing failure handling. No actionable merge-blocking risk remains; merge after normal checks pass. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation Issue
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Daily usage history sent both DAILY granularity and GroupBy to Cost Explorer, which rejects that combination. Keep DAILY, filter to the recommendation's exact instance type, and read each day's Total coverage so recommendations receive ordered usage points.
Closes #68
Validation: the real SDK/local HTTP regression failed against the original request and passes after the fix. It covers request shape on both pages, shuffled daily totals, tuple batching, missing days, absent totals and API errors. Removing DAILY or INSTANCE_TYPE independently makes it fail. The recommendations race suite, AWS module build and CI-pinned golangci-lint pass with Go 1.26.6 and GOWORK=off. This is local SDK/HTTP fixture verification against the official API contract; no live AWS call was made.
Independent review: gpt-6-astra completed two clean implementation passes and approved final SHA
3dc630dae83a5bf0e3b8f8be2c6919660054bf55after fetching it into an independent clone, confirming patch identity and rerunning focused race tests. The reviewer independently reproduced the pre-fix failure and passed the restored full recommendations race suite. Verdict: approved, subject to required hosted CI. CodeRabbit is waived for this session. Normal commit hooks passed. Added-comment ratio: 0.8%.Summary by CodeRabbit