Commit 64c9644
fix(init): emit INIT_REPORT(phase=init) for failed on-demand cold-start init
AWS performs a suppressed double init when an on-demand function's
cold-start init fails: it emits INIT_REPORT(phase=init, status=error)
for the failed cold-start init and INIT_REPORT(phase=invoke, status=error)
for the retried init folded into the first invocation. The RIE only
emitted the phase=invoke line.
Add ReportInitPhaseError() to emit the missing phase=init line and call
it on the on-demand init-failure path (onDemand && ErrInitDoneFailed),
mirroring the existing ReportInitTimeout() / phase=invoke emission. This
makes test_lambda_runtime_exit_segfault pass against LocalStack.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 867829a commit 64c9644
2 files changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
431 | 450 | | |
432 | 451 | | |
433 | 452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
339 | 343 | | |
340 | 344 | | |
341 | 345 | | |
| |||
0 commit comments