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

feat: Add experimental debug container command #204

Merged
merged 21 commits into from
Mar 20, 2024
Merged

feat: Add experimental debug container command #204

merged 21 commits into from
Mar 20, 2024

Conversation

nightkr
Copy link
Member

@nightkr nightkr commented Feb 12, 2024

Description

Adds a stackablectl experimental-debug command that creates and attaches a debug container. Compared to kubectl debug it should also (at least) mount in volumes and environment variables from the container being debugged.

Fixes #201.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

Preview Give feedback

Reviewer

Preview Give feedback

Acceptance

Preview Give feedback

Once the review is done, comment bors r+ (or bors merge) to merge. Further information

@nightkr
Copy link
Member Author

nightkr commented Feb 12, 2024

  • Create container
  • Attach
  • Fall back to pulling logs if attach fails (maybe?)
  • Clean up stdin
  • Docs

@nightkr nightkr marked this pull request as ready for review February 28, 2024 14:17
@nightkr
Copy link
Member Author

nightkr commented Feb 28, 2024

This is intentionally not part of the cockpit library since it's experimental and assumes that it's running in its own TTY. It could be factored out into a library component but I don't think it's super valuable to do preemptively.

@nightkr nightkr requested a review from a team February 28, 2024 14:20
@Techassi Techassi self-requested a review March 4, 2024 08:07
@NickLarsenNZ
Copy link
Member

NickLarsenNZ commented Mar 4, 2024

@nightkr, forgive my meddling. Was just trying to get the workflows to pass, so I added a couple of commits which were ultimately unnecessary as I backported some other changes to main which required those same two changes for the workflow to pass (I think). So, those two changes came in via the latest merge.

Copy link
Member

@Techassi Techassi left a comment

Choose a reason for hiding this comment

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

First round, mostly looking good!

rust/stackablectl/Cargo.toml Outdated Show resolved Hide resolved
rust/stackablectl/Cargo.toml Outdated Show resolved Hide resolved
rust/stackablectl/src/cmds/debug.rs Outdated Show resolved Hide resolved
rust/stackablectl/src/cmds/debug.rs Outdated Show resolved Hide resolved
rust/stackablectl/src/cmds/debug.rs Outdated Show resolved Hide resolved
rust/stackablectl/src/cmds/debug.rs Show resolved Hide resolved
rust/stackablectl/src/cmds/debug.rs Show resolved Hide resolved
Techassi
Techassi previously approved these changes Mar 13, 2024
@Techassi Techassi changed the title Debug container generator feat: Add experimental debug container command Mar 20, 2024
@nightkr nightkr added this pull request to the merge queue Mar 20, 2024
Merged via the queue into main with commit 3730ed3 Mar 20, 2024
54 checks passed
@nightkr nightkr deleted the feature/debug branch March 20, 2024 16:17
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.

Add command for creating a debug container
3 participants