milostatus

package
v0.0.0-...-8ff35f7 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotStatus

type BotStatus int

BotStatus indicates the status of a machine.

const (
	// Idle means the bot is ready to accept a job.
	Idle BotStatus = iota
	// Busy means the bot is currently running a job, or recently finished
	// a job and may not be ready to accept a new job yet.
	Busy
	// Offline means the bot is dead.
	Offline
	// Quarantined means the bot is quarantined.
	Quarantined
)

func (BotStatus) String

func (i BotStatus) String() string

type Status

type Status int

Status indicates the status of some piece of the CI; builds, steps, builders, etc. The UI maps this to a color, and some statuses may map to the same color; however, we attempt to preserve full informational fidelity.

const (
	// NotRun if the component has not yet been run.  E.g. if the component has
	// been scheduled, but is pending execution.
	NotRun Status = iota

	// Running if the component is currently running.
	Running

	// Success if the component has finished executing and accomplished what it
	// was supposed to.
	Success

	// Failure if the component has finished executing and failed in
	// a non-exceptional way. e.g. if a test completed execution, but determined
	// that the code was bad.
	Failure

	// Warning if the component has finished executing, but encountered
	// non-stoppage problems. e.g. if a test completed execution, but determined
	// that the code was slow (but not slow enough to be a failure).
	Warning

	// InfraFailure if the component has finished incompletely due to an
	// infrastructure layer.
	//
	// This is used to categorize all unknown errors.
	InfraFailure

	// Exception if the component has finished incompletely due to an exceptional
	// error in the task. That means the infrastructure layers executed the task
	// completely, but the task self-reported that it failed in an exceptional
	// way.
	//
	// DON'T USE THIS IN ANY NEW CODE. Instead, prefer InfraFailure.
	Exception

	// Expired if the component was never scheduled due to resource exhaustion.
	Expired

	// Canceled if the component had external intervention to stop it after it
	// was scheduled, but before it completed on its own.
	Canceled
)

func FromBuildbucket

func FromBuildbucket(status buildbucketpb.Status) Status

FromBuildbucket converts buildbucket status to milo status.

Note: this mapping between milo status and buildbucket status isn't one-to-one (i.e. `status == FromBuildbucket(status).ToBuildbucket()` is not always true).

func (Status) MarshalJSON

func (s Status) MarshalJSON() ([]byte, error)

MarshalJSON renders enums into String rather than an int when marshalling.

func (Status) String

func (i Status) String() string

func (Status) Terminal

func (s Status) Terminal() bool

Terminal returns true if the step status won't change.

func (Status) ToBuildbucket

func (status Status) ToBuildbucket() buildbucketpb.Status

ToBuildbucket converts milo status to buildbucket status.

Note: this mapping between milo status and buildbucket status isn't one-to-one (i.e. `status == FromBuildbucket(status).ToBuildbucket()` is not always true).

Jump to

Keyboard shortcuts

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