Commit c641e2f
🐛 Fix race condition in e2e code coverage collection (#2644)
* Fix race condition in e2e coverage collection
kubectl scale --replicas=0 is non-blocking and returns as soon as
the API server accepts the change, not when pods have terminated.
The existing wait on the copy pod was a no-op since it was already
running. This meant kubectl cp could run before manager pods had
terminated and flushed coverage data to the PVC.
Wait for each deployment's .status.replicas to reach 0 before
copying, ensuring the Go coverage runtime has written its data.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix race condition in e2e coverage collection
kubectl scale --replicas=0 is non-blocking and returns as soon as
the API server accepts the change, not when pods have terminated.
The existing wait on the copy pod was a no-op since it was already
running. This meant kubectl cp could run before manager pods had
terminated and flushed coverage data to the PVC.
Wait for manager pods to be deleted before copying, ensuring the
Go coverage runtime has written its data on process exit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent dd57c28 commit c641e2f
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
0 commit comments