Repository navigation
Fix flaky CI on windows - #13827
Fix flaky CI on windows#13827
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Windows CI workflow to reduce intermittent failures on windows-2022 by explicitly starting Docker before running the Windows CNI installation step (to ensure the nat HNS network is created).
Changes:
- Add a PowerShell step in the Windows integration job to start the
dockerWindows service beforescript/setup/install-cni-windows.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Maksym Pavlenko <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
integration/client/container_test.go:2789
strings.ContainsRune(out, 0)makes this test require an actual NUL byte in the captured output. On non-Windows,withProcessArgs("echo", "hello")runs directly in BusyBox (seeintegration/client/helpers_unix_test.go:40-42), and PTY output is typically plain text without NUL bytes, so this assertion is likely to fail cross-platform. The previous check also didn’t actually test for a NUL byte becausestrings.ContainsAny(..., "\\x00")only checks for any of the characters\\,x, or0.
Consider normalizing the output by stripping any NUL bytes (if present on Windows), trimming the trailing newline, and asserting the expected text instead.
out := buf.String()
if !strings.ContainsRune(out, 0) {
t.Fatalf("expected NUL byte in output, got %#q", out)
}
Signed-off-by: Maksym Pavlenko <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
integration/client/container_test.go:2788
- The null-byte assertion is currently incorrect:
strings.ContainsAny(...,\x00)checks for any one character in the set {\,x,0}, not the substring\x00. This can produce false positives (e.g., any output containingxor0) and doesn’t reliably validate the intended condition.
out := buf.String()
if !strings.ContainsAny(fmt.Sprintf("%#q", out), `\x00`) {
t.Fatalf(`expected \x00 in output, got %#q`, out)
| // Otherwise there is a race between the IO copy goroutine writing to buf | ||
| // and the read below, which is flaky on Windows named pipes. Wait must be | ||
| // called before Delete, which cancels the IO. | ||
| task.IO().Wait() |
Fix flaky Windows tests:
hcnCreateNetwork failed in Win32: Element not found- 1, 2, 3output `` does not contain \x00- 1