Repository navigation
integration/client: fix TestContainerExecLargeOutputWithTTY - #14120
Conversation
Wait for IO copying to complete before deleting the exec process. Delete cancels outstanding IO operations, which can truncate the output. ``` === NAME TestContainerExecLargeOutputWithTTY container_test.go:1990: process output does not end with "999999 1000000" at iteration 1, here are the last 20 characters of the output: "1150 991151 991152 9" --- FAIL: TestContainerExecLargeOutputWithTTY (2.00s) ``` In a follow-up, we should add comment for Delete API and document that the caller should take responsibility to drain IO before Delete. Signed-off-by: Wei Fu <[email protected]>
33c55c0 to
68f92da
Compare
There was a problem hiding this comment.
🟢 Approval recommended
The change is minimal, aligns with the stated root cause (Delete cancels IO), and mirrors established test patterns for draining IO before deletion.
Pull request overview
This PR fixes a flaky integration test by ensuring exec process stdout is fully drained before the exec process is deleted, avoiding truncation caused by Delete cancelling in-flight IO copy operations.
Changes:
- Add an explicit
process.IO().Wait()inTestContainerExecLargeOutputWithTTYbefore callingprocess.Delete(ctx).
File summaries
| File | Description |
|---|---|
| integration/client/container_test.go | Ensures exec IO copying completes before Delete cancels IO, preventing truncated output in the large TTY exec test. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
I find there is already an io wait "p.io.Wait()" after delete. @fuweid |
If task has been deleted, shim will not wait for IO copying to complete. |
Please checkout the end of function and you will see we already drain IO coping. |
|
/cherry-pick release/2.3 |
|
@samuelkarp: new pull request created: #14303 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@samuelkarp: new pull request created: #14304 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@samuelkarp: new pull request created: #14305 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Wait for IO copying to complete before deleting the exec process. Delete cancels outstanding IO operations, which can truncate the output.
In a follow-up, we should add comment for Delete API and document that the caller should take responsibility to drain IO before Delete.