Skip to content

Conversation

@adamshiervani
Copy link
Contributor

Summary

  • Append diagnostics to log file when supervisor detects a crash

Checklist

  • Ran make test_e2e locally and passed
  • Linked to issue(s) above by issue number (e.g. Closes #<issue-number>)
  • One problem per PR (no unrelated changes)
  • Lints pass; CI green
  • Tricky parts are commented in code

@adamshiervani adamshiervani merged commit d84ff1b into dev Jan 7, 2026
3 checks passed
@adamshiervani adamshiervani deleted the fix/diagnostics-on-crash branch January 7, 2026 14:25
// runCmdLog runs a command and logs its output.
func (d *Diagnostics) runCmdLog(label string, cmd string, args ...string) {
ctx, cancel := context.WithTimeout(context.Background(), defaultCmdTimeout)
parentCtx := d.ctx
Copy link
Contributor

Choose a reason for hiding this comment

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

I usually use a coalescing helper (in a utils package) for this

func orBackground(ctx context.Context) context.Context {
	if ctx == nil {
		return context.Background()
	} else {
		return ctx
	}
}

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.

3 participants