Skip to content
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

fix: fix docker exec stdout EOF missing #93

Merged

Conversation

xzchaoo
Copy link
Contributor

@xzchaoo xzchaoo commented Mar 12, 2024

Which issue does this PR close?

Closes #

Rationale for this change

When using the docker exec function, we have no way to perceive the stdout EOF or stderr EOF event of exec. We can only wait until the entire resp.Reader EOF before we can consider that both stdout and stderr are EOF. This will cause the connection to hang in some scenarios that rely heavily on the EOF signal.

What changes are included in this PR?

Add an auxiliary command fixOut, which can execute a child process and re-encode the stdout and stderr of the child process, including the EOF signal.

Are there any user-facing changes?

How does this change test

@xzchaoo xzchaoo added the bug Something isn't working label Mar 12, 2024
@xzchaoo xzchaoo requested a review from sw1136562366 March 12, 2024 12:15
@xzchaoo xzchaoo self-assigned this Mar 12, 2024
@xzchaoo xzchaoo force-pushed the fix_docker_exec_stdout_eof_missing branch from dc0ad61 to 1efb909 Compare March 12, 2024 12:18
Copy link
Collaborator

@sw1136562366 sw1136562366 left a comment

Choose a reason for hiding this comment

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

LGTM

@sw1136562366 sw1136562366 merged commit 3ccbd6b into traas-stack:main Mar 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants