Uh oh!
There was an error while loading. Please reload this page.
fix: container stream should not be terminated by ctx - #5247
Merged
Conversation
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## master #5247 +/- ##
==========================================
+ Coverage 61.48% 61.49% +0.01%
==========================================
Files 298 298 Lines 20811 20812 +1 ==========================================
+ Hits 12795 12798 +3 + Misses 7103 7099 -4 - Partials 913 915 +2 |
vvoland
reviewed
Jul 9, 2024
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
Benehiko
commented
Jul 11, 2024
MemberAuthor
hmm... latest commit causing some strange test failures. Don't merge this yet since I've been able to get the same error locally. 51.13 === Failed51.13 === FAIL: cli/command/container TestRunCommandWithContentTrustErrors (unknown)51.13 --- PASS: TestRunCommandWithContentTrustErrors/offline-notary-server (0.00s)51.13 Error: write /dev/pts/0: file already closed51.13 --- PASS: TestRunCommandWithContentTrustErrors/uninitialized-notary-server (0.00s)51.13 panic: Fail in goroutine after TestRunAttachTermination has completed51.13 51.13 goroutine 71 [running]:51.13 testing.(*common).Fail(0xc000780340)51.13 /usr/local/go/src/testing/testing.go:952 +0xd451.13 testing.(*common).FailNow(0xc000780340)51.13 /usr/local/go/src/testing/testing.go:975 +0x2651.13 github.com/docker/cli/vendor/gotest.tools/v3/assert.ErrorIs({0x1030a50, 0xc000780340}, {0x1027d40?, 0xc0003e6090}, {0x1027e20?, 0x16ddf30}, {0x0, 0x0, 0x0})51.13 /go/src/github.com/docker/cli/vendor/gotest.tools/v3/assert/assert.go:311 +0x15951.13 github.com/docker/cli/cli/command/container.TestRunAttachTermination.func6()51.13 /go/src/github.com/docker/cli/cli/command/container/run_test.go:85 +0x8551.13 created by github.com/docker/cli/cli/command/container.TestRunAttachTermination in goroutine 20951.13 /go/src/github.com/docker/cli/cli/command/container/run_test.go:84 +0x486 |
Benehiko
commented
Jul 11, 2024
MemberAuthor
So I've been running tests locally quite a few times and could not reproduce this again... So maybe just a flake. |
vvoland
approved these changes
Jul 11, 2024
krissetto
approved these changes
Jul 11, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes: #5241
- What I did
Prevent the hijacked stream from exiting on main
ctxcancellation. When the user sends a termination signal to the CLI while attached to a container, the signal should be forwarded to the container and handled by the process inside the container. The CLI should wait for the container to gracefully exit.If the user wishes to exit without waiting, sending more termination requests will still forcefully exit the CLI.
- How I did it
- How to verify it
handle_sigterm.sh
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)