Documentation ¶
Overview ¶
Package updater reads the latest test results and saves updated state.
Index ¶
- Constants
- Variables
- func InflateDropAppend(ctx context.Context, log logrus.FieldLogger, client gcs.Client, ...) error
- func Means(properties map[string][]string) map[string]float64
- func SplitCells(originalName string, cells ...Cell) map[string]Cell
- func Update(parent context.Context, client gcs.ConditionalClient, configPath gcs.Path, ...) error
- type Cell
- type ColumnReader
- type GroupUpdater
- type InflatedColumn
Constants ¶
const ElapsedKey = "test-duration-minutes"
Variables ¶
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 SplitCells ¶ added in v0.0.56
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
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.