updater

package
v0.0.58 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package updater reads the latest test results and saves updated state.

Index

Constants

View Source
const ElapsedKey = "test-duration-minutes"

Variables

View Source
var AllowMultiplePaths = map[string]bool{}

AllowMultiplePaths enables combining multiple jobs together using a comma.

This feature is undocumented and poorly tested, so restrict to specific groups. TODO(fejta): redesign this feature (using symlinks?), ensure it works correctly.

Functions

func InflateDropAppend added in v0.0.56

func InflateDropAppend(ctx context.Context, log logrus.FieldLogger, client gcs.Client, tg *configpb.TestGroup, gridPath gcs.Path, write bool, readCols ColumnReader) error

InflateDropAppend updates groups by downloading the existing grid, dropping old rows and appending new ones.

func Means added in v0.0.56

func Means(properties map[string][]string) map[string]float64

func SplitCells added in v0.0.56

func SplitCells(originalName string, cells ...Cell) map[string]Cell

func Update

func Update(parent context.Context, client gcs.ConditionalClient, configPath gcs.Path, gridPrefix string, groupConcurrency int, group string, updateGroup GroupUpdater, write bool) error

Update performs a single update pass of all all test groups specified by the config.

Types

type Cell added in v0.0.56

type Cell struct {
	Result statuspb.TestStatus

	ID     string
	CellID string

	Icon    string
	Message string

	Metrics map[string]float64
}

Cell holds a row's values for a given column

func MergeCells added in v0.0.56

func MergeCells(cells ...Cell) Cell

type ColumnReader added in v0.0.56

type ColumnReader func(ctx context.Context, log logrus.FieldLogger, tg *configpb.TestGroup, oldCols []inflatedColumn, stop time.Time) ([]inflatedColumn, error)

A ColumnReader will find, process and return new columns to insert into the front of grid state.

type GroupUpdater added in v0.0.29

type GroupUpdater func(parent context.Context, log logrus.FieldLogger, client gcs.Client, tg *configpb.TestGroup, gridPath gcs.Path) error

GroupUpdater will compile the grid state proto for the specified group and upload it.

This typically involves downloading the existing state, dropping old columns, compiling any new columns and inserting them into the front and then uploading the proto to GCS.

func GCS added in v0.0.29

func GCS(groupTimeout, buildTimeout time.Duration, concurrency int, write bool) GroupUpdater

GCS returns a GCS-based GroupUpdater, which knows how to process result data stored in GCS.

type InflatedColumn added in v0.0.56

type InflatedColumn struct {
	Column *statepb.Column
	Cells  map[string]Cell
}

InflatedColumn holds all the entries for a given column.

This includes both: * Column state metadata and * Cell values for every row in this column

Jump to

Keyboard shortcuts

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