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

plugincontainer: Add debug mode #91

Merged
merged 4 commits into from
Sep 5, 2023
Merged

plugincontainer: Add debug mode #91

merged 4 commits into from
Sep 5, 2023

Conversation

tomhjp
Copy link
Contributor

@tomhjp tomhjp commented Sep 4, 2023

Adds a debug mode which does extra work to help diagnose why a plugin may have failed to start, and make it easier for users to re-run their plugins interactively to better understand their behaviour.

In particular, we disable the AutoRemove option in the Docker SDK when debug is enabled, otherwise we may end up in a race with the container runtime to salvage debug information before the container is killed and cleaned up.

We also only print environment variables in the diagnose notes if debug is enabled, as they could reasonably contain secrets the plugin needs to consume.

@tomhjp tomhjp changed the title Add debug mode plugincontainer: Add debug mode Sep 4, 2023
Copy link
Contributor

@swenson swenson left a comment

Choose a reason for hiding this comment

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

LGTM

plugincontainer/container_runner.go Outdated Show resolved Hide resolved
Base automatically changed from drop-all-capabilities to main September 5, 2023 19:03
@tomhjp
Copy link
Contributor Author

tomhjp commented Sep 5, 2023

Thanks!

@tomhjp tomhjp merged commit c3769e6 into main Sep 5, 2023
17 checks passed
@tomhjp tomhjp deleted the debug-option branch September 5, 2023 21:22
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