Skip to content

Conversation

@cgwalters
Copy link
Collaborator

If we fail to launch, because we used --rm the container would exit and we couldn't get its logs.

Change to removing the container image via a drop handler, so if the system fails to launch (e.g. it's missing a kernel or bwrap) we can get the logs from that.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant improvement to the error handling of the run-ssh command. By replacing the --rm flag with a Drop guard for container cleanup, it ensures that logs from failed container startups can be retrieved, which is crucial for debugging. The addition of a new integration test with a broken image fixture effectively validates this new behavior. The changes are well-structured, and the added logging and error context in failure paths are very valuable. I have a couple of suggestions to improve the robustness of a test helper function and the efficiency of a new logging function.

If we fail to launch, because we used `--rm` the container
would exit and we couldn't get its logs.

Change to removing the container image via a drop handler,
so if the system fails to launch (e.g. it's missing a kernel or bwrap)
we can get the logs from that.

Signed-off-by: Colin Walters <walters@verbum.org>
Copy link
Collaborator

@gursewak1997 gursewak1997 left a comment

Choose a reason for hiding this comment

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

looks sane

@cgwalters cgwalters merged commit 46deadc into bootc-dev:main Nov 18, 2025
18 of 25 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