Commit 7d8c576
authored
fix(mac): handle RunInstances scale errors (github-aws-runners#5183)
## Description
Adds scale-error handling for the dedicated-host `RunInstances` path.
`RunInstances` does not return fleet-style `Errors`, so the catch block
now checks the thrown AWS SDK error `name` against configured
`scaleErrors` and throws `ScaleError` to trigger retry behavior. The
successful response path is split into `processRunInstanceResult` to
validate returned instance IDs.
## Test Plan
- Tested in my AWS environment with a dedicated-host scale-up where no
compatible host capacity was available.
- Confirmed `RunInstances` failed with `InsufficientHostCapacity`, the
error was matched through `error.name`, and `ScaleError` was thrown so
the request is retried.
## Related Issues
N/A1 parent 58fd1c2 commit 7d8c576
2 files changed
Lines changed: 66 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1229 | 1229 | | |
1230 | 1230 | | |
1231 | 1231 | | |
1232 | | - | |
| 1232 | + | |
1233 | 1233 | | |
1234 | 1234 | | |
1235 | 1235 | | |
| |||
1239 | 1239 | | |
1240 | 1240 | | |
1241 | 1241 | | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
1242 | 1273 | | |
1243 | 1274 | | |
1244 | 1275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
235 | 257 | | |
236 | 258 | | |
237 | 259 | | |
| |||
333 | 355 | | |
334 | 356 | | |
335 | 357 | | |
| 358 | + | |
336 | 359 | | |
337 | 360 | | |
338 | 361 | | |
| |||
364 | 387 | | |
365 | 388 | | |
366 | 389 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
372 | 399 | | |
373 | 400 | | |
374 | | - | |
375 | | - | |
376 | 401 | | |
377 | 402 | | |
378 | 403 | | |
| 404 | + | |
| 405 | + | |
379 | 406 | | |
380 | 407 | | |
381 | 408 | | |
| |||
0 commit comments