Fix: capture tart stderr on VM/runner failure#35
Merged
Conversation
Previously tart run/exec failures only logged "exit status 1" with no
stderr output, making it impossible to diagnose issues. Now stderr is
streamed to a temp file (/tmp/outrunner-{vm,runner}-<name>.log) and the
last 1KB is included inline in the error log. Log files are cleaned up
on success.
- runAndLog now falls back to running without stderr capture if the temp file can't be created, instead of silently skipping the command - Use os.CreateTemp for unpredictable file paths - Fix errcheck lint warnings in tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exit status 1with no stderr, making debugging impossible/tmp/outrunner-vm-<name>-1234567.log) and the last 1KB is included inline in the error logrunAndLoghelper to eliminate duplication between the VM and runner goroutinesTest plan
make buildpassesmake lintpassesgo test ./provisioner/tart/— 8 tests pass