bugreport

package
v0.1.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package bugreport collects the evidence a rotari bug report needs: the build, the host and filesystem, configuration, the supervisor log, and the state files of a run, with secrets removed. It reads state and runs only read-only scheduler commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteTarGz

func WriteTarGz(target, root string, bundle Bundle, modified time.Time) (err error)

WriteTarGz writes bundle to a new file at target as a gzip-compressed tar archive under a top directory named root. The summary is root/README.md. An existing file is not replaced.

Types

type Bundle

type Bundle struct {
	Summary string
	Files   []File
}

Bundle is a collected bug report: a Markdown summary and the files it draws on.

func Collect

func Collect(options Options) (Bundle, error)

Collect gathers a bug report. It fails only for a selection that cannot be read, such as a missing run or job; anything else it cannot collect is noted in the summary.

type File

type File struct {
	Name string
	Data []byte
}

File is one entry of a bundle, named by a slash-separated relative path.

type Options

type Options struct {
	Version string
	BaseDir string
	// Project and RunID select the run to collect; either may be empty.
	Project string
	RunID   string
	// JobIDs selects jobs of the run; empty selects its jobs that did not
	// succeed.
	JobIDs []string
	Output OutputMode
	// Redact replaces paths and hostnames. Secrets are removed regardless.
	Redact bool
	// Facts are files the caller produced, such as `rotari info --json`.
	Facts   []File
	Environ []string
	Now     func() time.Time
}

Options select what Collect gathers.

type OutputMode

type OutputMode int

OutputMode says how much of each included job's own output to collect.

const (
	// OutputTail collects the last outputTailBytes of each output file.
	OutputTail OutputMode = iota
	// OutputFull collects each output file up to outputFullBytes.
	OutputFull
	// OutputNone collects no job output.
	OutputNone
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL