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

Support tui mode for docker session #83

Merged

Conversation

eharris128
Copy link
Contributor

What

  • Add proof of concept for tui driven debugging of a docker container

Why

  • Support input parsing and keypress forwarding for tui driven docker debug session
  • Wanted to stand up this MR for feedback / criticism of the input stream modifications for executions.

How Tested

Follow Up

  • TUI should provide UI feedback after a user has exited a debug session.
  • Unhardcoding of debug docker specific controls.

Additional Observation

  • docker list sessions -> does not display the target for the running session
  • k8s list sessions -> does display target for running sessions.

/bin/linux/mint debug --runtime=docker --list-sessions

evan@evan-Precision-5550:~/projects/mint$ ./bin/linux/mint debug --runtime=docker --list-sessions
cmd=debug state=started
cmd=debug info=cmd.input.params runtime='docker' target='' debug-image='busybox@sha256:05a79c7279f71f86a2a0d05eb72fcb56ea36139150f0a75cd87e80a4272e4e39' gid='-1' fallback-to-target-user='true' entrypoint='[]' cmd='[]' terminal='true' run-as-target-shell='true' uid='-1' 
cmd=debug state=action.list_sessions target= 
cmd=debug info=debug.session.count total='1' running='1' waiting='0' terminated='0' 
cmd=debug info=debug.session target='' name='mint-debugger-13b69f3885f133ce9562814e3c4717931efc7718' image='busybox@sha256:05a79c7279f71f86a2a0d05eb72fcb56ea36139150f0a75cd87e80a4272e4e39' state='RUNNING' start.time='2024-11-04 10:50:16 -0500 EST' 
cmd=debug state=completed
cmd=debug state=done```

@kcq
Copy link
Contributor

kcq commented Nov 5, 2024

@eharris128 how functional is this enhancement? any gotchas?

@eharris128
Copy link
Contributor Author

@eharris128 how functional is this enhancement? any gotchas?

Within the scope of the TUI, the gotchas include the simple hardcoding of code path.

Outside of the TUI codepath, I do not see nor have I detected any gotchas.

@kcq kcq merged commit b059444 into mintoolkit:master Nov 6, 2024
3 of 18 checks passed
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.

2 participants