Skip to content

fix: allow attaching to any combination of stdin/stdout/stderr#8316

Merged
estesp merged 1 commit intocontainerd:mainfrom
davidhsingyuchen:partial-attach
Aug 1, 2023
Merged

fix: allow attaching to any combination of stdin/stdout/stderr#8316
estesp merged 1 commit intocontainerd:mainfrom
davidhsingyuchen:partial-attach

Conversation

@davidhsingyuchen
Copy link
Copy Markdown
Contributor

Before this PR, if a stdin/stdout/stderr stream is nil, and the corresponding FIFO is not an empty string, a panic will occur when Read/Write of the nil stream is invoked in io.CopyBuffer.

@k8s-ci-robot
Copy link
Copy Markdown

Hi @davidhsingyuchen. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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/test-infra repository.

@dims
Copy link
Copy Markdown
Member

dims commented Mar 29, 2023

/ok-to-test

@k8s-ci-robot
Copy link
Copy Markdown

@dims: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/ok-to-test

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/test-infra repository.

@dims
Copy link
Copy Markdown
Member

dims commented Mar 29, 2023

/ok-to-test

@dims
Copy link
Copy Markdown
Member

dims commented Mar 29, 2023

/test all

@k8s-ci-robot
Copy link
Copy Markdown

@dims: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/test all

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/test-infra repository.

@dims
Copy link
Copy Markdown
Member

dims commented Mar 29, 2023

/retest

@k8s-ci-robot
Copy link
Copy Markdown

@dims: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

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/test-infra repository.

@dims
Copy link
Copy Markdown
Member

dims commented Mar 29, 2023

/test pull-containerd-node-e2e

@k8s-ci-robot
Copy link
Copy Markdown

@dims: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/test pull-containerd-node-e2e

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/test-infra repository.

@samuelkarp
Copy link
Copy Markdown
Member

/ok-to-test

@davidhsingyuchen
Copy link
Copy Markdown
Contributor Author

davidhsingyuchen commented Jun 5, 2023

Thanks Kazuyoshi for the review. @samuelkarp Could you help take a look, thanks! (I guess 2 approvals are needed?)

@samuelkarp
Copy link
Copy Markdown
Member

@davidhsingyuchen Would you mind adding a unit test to cover the behavior you've changed? There's a unit test covering NewAttach here, but it only covers the situation where all streams are non-nil.

@davidhsingyuchen
Copy link
Copy Markdown
Contributor Author

@samuelkarp Thank you for the reminder! Done.

@davidhsingyuchen
Copy link
Copy Markdown
Contributor Author

@kzys @samuelkarp Would you mind taking a look at the latest revision, thanks!

@davidhsingyuchen davidhsingyuchen requested a review from kzys July 11, 2023 17:01
@estesp
Copy link
Copy Markdown
Member

estesp commented Jul 31, 2023

Can you re-base on current main to pick up several CI fixes? That should allow for a clean CI run

Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Before this PR, if a stdin/stdout/stderr stream is nil,
and the corresponding FIFO is not an empty string,
a panic will occur when Read/Write of the nil stream is invoked in io.CopyBuffer.

Signed-off-by: Hsing-Yu (David) Chen <[email protected]>
@davidhsingyuchen
Copy link
Copy Markdown
Contributor Author

Can you re-base on current main to pick up several CI fixes? That should allow for a clean CI run

done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants