-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor command/container/run.go
#5693
Draft
laurazard
wants to merge
8
commits into
docker:master
Choose a base branch
from
laurazard:run-refactor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+121
−89
Conversation
This file contains 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
Signed-off-by: Laura Brehm <[email protected]>
Signed-off-by: Laura Brehm <[email protected]>
Signed-off-by: Laura Brehm <[email protected]>
The signal proxy forwards received signals to the container. There's no need to start it so long before starting the container, so move it closer to the `ContainerStart` call. Signed-off-by: Laura Brehm <[email protected]>
Signed-off-by: Laura Brehm <[email protected]>
There's no reason to use a non-cancellable context for the `ContainerStart` call – this was previously only incidentally non-cancellable, but in reality we probably want to be able to cancel the start call. Signed-off-by: Laura Brehm <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5693 +/- ##
==========================================
- Coverage 59.54% 59.52% -0.02%
==========================================
Files 346 346
Lines 29379 29385 +6
==========================================
- Hits 17494 17492 -2
- Misses 10914 10919 +5
- Partials 971 974 +3 |
laurazard
force-pushed
the
run-refactor
branch
from
December 16, 2024 09:53
4582a38
to
24c8ee2
Compare
During an attached `docker run`, the CLI starts capturing signals so that they can be forwarded to the container. The CLI stops capturing signals after container is no longer running/it's streams are closed. This test had two issues: - it would close the streams early, causing the CLI to think the container had exited, and stop signal handling (causing the SIGINT to not be captured and interrupt the test instead), and - it would send immediately on the status channel returned by WaitFunc, which would also signal the container has exited and caused the CLI to stop signal handling This patch addresses both of these issues and makes this test less flaky. Signed-off-by: Laura Brehm <[email protected]>
Signed-off-by: Laura Brehm <[email protected]>
laurazard
force-pushed
the
run-refactor
branch
from
December 16, 2024 11:23
24c8ee2
to
3379da2
Compare
Sign up for free
to 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.
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)