Wait for the runners to close#5560
Conversation
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #5560 +/- ##
==========================================
- Coverage 65.22% 65.20% -0.02%
==========================================
Files 213 213
Lines 34106 34111 +5
==========================================
- Hits 22246 22243 -3
- Misses 10533 10541 +8
Partials 1327 1327 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/retest |
|
|
||
| // Wait exit signal | ||
| // Wait for the context to be done, which usually happens the process receives a SIGTERM or SIGINT. | ||
| <-ctx.Done() |
There was a problem hiding this comment.
note on why <-runnersDone is needed; Right after ctx is canceled, this main goroutine will call os.Exit(0) vs runners are not running on the main goroutine. so without blocking and waiting for it to return, this will highly likely leave some undesirable state orphaned that is supposed to be cleaned up by non-main goroutine where runners' Close() is executed.
This is a follow up on #5527 which was not sufficient to ensure Envoy processes to stop before exiting the program.
Release Notes: No