deploywhy

package
v1.5.10 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 1 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 deploywhy turns the stored facts of one deploy into a short verdict.

Index

Constants

View Source
const (
	VerdictOOMKilled    = "oom_killed"
	VerdictExitNonZero  = "exit_nonzero"
	VerdictHealthFailed = "health_failing"
	VerdictNewLogs      = "new_log_patterns"
	VerdictNoSignal     = "no_signal"
	VerdictOK           = "ok"
)

Verdict names the strongest signal found, in priority order.

Variables

This section is empty.

Functions

This section is empty.

Types

type Health

type Health struct {
	Target     string `json:"target"`
	Success    bool   `json:"success"`
	StatusCode int    `json:"status_code,omitempty"`
	Error      string `json:"error,omitempty"`
}

Health is the last probe result recorded for the deploy.

type Input

type Input struct {
	DeployID         string
	Failed           bool
	ExitCode         *int
	OOMKilled        bool
	Health           *Health
	Templates        []Template
	BaselineID       string
	BaselineTemplate []Template
}

Input is everything Compute needs, all read from stored records.

type Report

type Report struct {
	DeployID         string     `json:"deploy_id"`
	Verdict          string     `json:"verdict"`
	ExitCode         *int       `json:"exit_code,omitempty"`
	OOMKilled        bool       `json:"oom_killed,omitempty"`
	Health           *Health    `json:"health,omitempty"`
	BaselineID       string     `json:"baseline_deploy_id,omitempty"`
	NewTemplateCount int        `json:"new_template_count"`
	NewTemplates     []Template `json:"new_templates"`
}

Report is the verdict and its evidence.

func Compute

func Compute(in Input) Report

Compute picks the verdict. A template is new when the last good deploy has no cluster with the same id.

type Template

type Template struct {
	TemplateID string `json:"template_id"`
	Template   string `json:"template"`
	Count      int    `json:"count"`
	Sample     string `json:"sample"`
}

Template is one log cluster; Sample is already secret-masked.

Jump to

Keyboard shortcuts

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