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

use docker/cli RunExec and RunStart to handle all the interactive/tty/* terminal logic #9258

Merged
merged 2 commits into from
Mar 16, 2022

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Mar 9, 2022

What I did

dropped all the interactive run/exec logic by leveraging RunExec/RunStart from docker/cli
Using this battle-tested code will make compose way more robust than our attempts to re-implement all corner cases

tested to confirm we don't resurect #8908

@ndeloof ndeloof requested review from ulyssessouza, glours and rumpl March 9, 2022 16:54
@ndeloof ndeloof force-pushed the RunExec branch 4 times, most recently from 02cb5ac to 7d20687 Compare March 9, 2022 17:16
Copy link
Member

@rumpl rumpl left a comment

Choose a reason for hiding this comment

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

LGTM after cleanup of unused functions, conflict resolution and formatting :D

Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM, I really like this PR 🤩
Just need to fix the linter issues and remove unnecessary method before merging

@ndeloof ndeloof force-pushed the RunExec branch 4 times, most recently from 89a9a70 to a5373fd Compare March 15, 2022 10:58
@ndeloof
Copy link
Contributor Author

ndeloof commented Mar 15, 2022

There's something weird with this one: test gets an empty stdout, while running same command works. I don't get it

…/* terminal logic

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@thaJeztah
Copy link
Member

thaJeztah commented Mar 15, 2022

There's something weird with this one: test gets an empty stdout, while running same command works. I don't get it

Does it need something like https://github.com/creack/pty to have a TTY in the test? See, e.g. https://github.com/moby/moby/blob/a6919e12b103aab6eb95a67450b2a487bfec1097/integration-cli/docker_cli_attach_unix_test.go#L27-L35

@ndeloof
Copy link
Contributor Author

ndeloof commented Mar 15, 2022

ok, I eventually remembered the initial intent was to restore TTY auto-detection. Went to far into dependent changes :P

@ndeloof ndeloof force-pushed the RunExec branch 2 times, most recently from bd0eea6 to a2ae4fe Compare March 15, 2022 17:38
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants