Repository navigation
Commit 2e65667
fix(billing-cost-management-mcp-server)!: drop always-null ri-performance coverage_cost fields (#4835)
format_coverage_metrics read ReservedCost, TotalCost and CoverageCostPercentage
from GetReservationCoverage's CoverageCost. That shape has only OnDemandCost
(botocore, the API reference and live responses agree), so coverage_cost always
carried reserved_cost, total_cost and coverage_cost_percentage as null, at every
level (overall, per period, per group). An agent could read the null percentage
as unknown or zero cost coverage.
coverage_cost now holds only on_demand_cost. Coverage percentages come from
coverage_hours (and coverage_normalized_units for EC2), as before.
BREAKING CHANGE: ri-performance get_reservation_coverage no longer returns
coverage_cost.reserved_cost, coverage_cost.total_cost or
coverage_cost.coverage_cost_percentage. They were always null.
Tests: the fixtures no longer invent CoverageCost members, and a new guard
checks that the mocked GetReservationCoverage and GetReservationUtilization
responses use only members of the botocore output shapes.
Co-authored-by: Junaid Girkar <60307291+junaidgirkar@users.noreply.github.com>1 parent 56775c6 commit 2e65667
3 files changed
Lines changed: 50 additions & 25 deletions
File tree
- src/billing-cost-management-mcp-server
- awslabs/billing_cost_management_mcp_server/tools
- tests/tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | | - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
573 | 575 | | |
574 | 576 | | |
575 | 577 | | |
576 | 578 | | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | 579 | | |
581 | 580 | | |
582 | 581 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
| |||
118 | 116 | | |
119 | 117 | | |
120 | 118 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | 119 | | |
125 | 120 | | |
126 | 121 | | |
| |||
138 | 133 | | |
139 | 134 | | |
140 | 135 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | 136 | | |
145 | 137 | | |
146 | 138 | | |
| |||
158 | 150 | | |
159 | 151 | | |
160 | 152 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | 153 | | |
165 | 154 | | |
166 | 155 | | |
| |||
176 | 165 | | |
177 | 166 | | |
178 | 167 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | 168 | | |
183 | 169 | | |
184 | 170 | | |
| |||
234 | 220 | | |
235 | 221 | | |
236 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
237 | 266 | | |
238 | 267 | | |
239 | 268 | | |
| |||
246 | 275 | | |
247 | 276 | | |
248 | 277 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | 278 | | |
253 | 279 | | |
254 | 280 | | |
| |||
270 | 296 | | |
271 | 297 | | |
272 | 298 | | |
273 | | - | |
274 | | - | |
275 | | - | |
| 299 | + | |
| 300 | + | |
276 | 301 | | |
277 | 302 | | |
278 | 303 | | |
| |||
0 commit comments