Skip to content

Fix: capture tart stderr on VM/runner failure#35

Merged
psubocz merged 2 commits intomainfrom
fix/tart-stderr-logging
Apr 8, 2026
Merged

Fix: capture tart stderr on VM/runner failure#35
psubocz merged 2 commits intomainfrom
fix/tart-stderr-logging

Conversation

@psubocz
Copy link
Copy Markdown
Collaborator

@psubocz psubocz commented Apr 8, 2026

Summary

  • Tart VM and runner failures previously only logged exit status 1 with no stderr, making debugging impossible
  • Stderr is now streamed to a temp file (e.g. /tmp/outrunner-vm-<name>-1234567.log) and the last 1KB is included inline in the error log
  • Log files are automatically cleaned up on successful exit
  • If the temp file can't be created, the command still runs — just without stderr capture
  • Extracted shared runAndLog helper to eliminate duplication between the VM and runner goroutines
  • Added unit tests for the tail buffer and stderr log

Test plan

  • make build passes
  • make lint passes
  • go test ./provisioner/tart/ — 8 tests pass

psubocz added 2 commits April 8, 2026 13:26
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
@psubocz psubocz merged commit 8bd7ace into main Apr 8, 2026
1 check passed
@psubocz psubocz deleted the fix/tart-stderr-logging branch April 9, 2026 23:23
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.

1 participant