resultingester

package
v0.0.0-...-110cdec Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package resultingester defines the task queue which ingests test results from ResultDB and pushes it into: - Test results table (for exoneration analysis) - Test results BigQuery export - Changepoint analysis

Package resultingester defines the task queue which ingests test results from ResultDB and pushes it into: - Test results table (for exoneration analysis) - Test results BigQuery export - Changepoint analysis

Package resultingester defines the task queue which ingests test results from ResultDB and pushes it into: - Test results table (for exoneration analysis) - Test results BigQuery export - Changepoint analysis

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTaskHandler

func RegisterTaskHandler(srv *server.Server) error

RegisterTaskHandler registers the handler for result ingestion tasks.

func Schedule

func Schedule(ctx context.Context, task *taskspb.IngestTestResults)

Schedule enqueues a task to ingest test results from a build.

Types

type IngestForChangepointAnalysis

type IngestForChangepointAnalysis struct {
	// contains filtered or unexported fields
}

IngestForChangepointAnalysis implements an ingestion stage that ingests test results into the changepoint analysis.

func NewIngestForChangepointAnalysis

func NewIngestForChangepointAnalysis(exporter *tvbexporter.Exporter) *IngestForChangepointAnalysis

NewIngestForChangepointAnalysis initialises a new IngestForChangepointAnalysis.

func (*IngestForChangepointAnalysis) Ingest

func (a *IngestForChangepointAnalysis) Ingest(ctx context.Context, input Inputs) (err error)

Ingest ingests test results into the changepoint analysis.

func (IngestForChangepointAnalysis) Name

Name returns a unique name for the ingestion stage.

type IngestForExoneration

type IngestForExoneration struct{}

IngestForExoneration implements an ingestion stage that writes test results to the TestResultsBySourcePosition table.

func (IngestForExoneration) Ingest

func (IngestForExoneration) Ingest(ctx context.Context, input Inputs) (err error)

Ingest writes test results to the TestResultsBySourcePosition table.

func (IngestForExoneration) Name

Name returns a unique name for the ingestion stage.

type IngestionSink

type IngestionSink interface {
	// A short identifier for the sink, for use in errors.
	Name() string
	// Ingest the test results.
	Ingest(ctx context.Context, input Inputs) error
}

IngestionSink is the interface implemented by consumers of test results in the ingestion pipeline.

type Inputs

type Inputs struct {
	// The LUCI Project of the export root.
	Project string
	// The subrealm of the export root. This is the realm, minus the LUCI project.
	SubRealm string
	// The ResultDB host.
	ResultDBHost string
	// The invocation ID of the export root.
	RootInvocationID string
	// The invocation ID of the invocation we are ingesting.
	InvocationID string
	// The page number we are ingesting.
	PageNumber int
	// The start of the data retention period for the data being ingested.
	PartitionTime time.Time
	// The sources tested by the invocation. May be nil if no sources
	// are specified.
	Sources *analysispb.Sources
	// The immediate parent resultdb invocation.
	Parent *resultpb.Invocation
	// The test verdicts to ingest.
	Verdicts []*resultpb.RunTestVerdict
}

Inputs captures all input into a test results analysis or export.

type TestResultsExporter

type TestResultsExporter struct {
	// contains filtered or unexported fields
}

TestResultsExporter is an ingestion stage that exports test results to BigQuery. It implements IngestionSink.

func NewTestResultsExporter

func NewTestResultsExporter(client exporter.InsertClient) *TestResultsExporter

NewTestResultsExporter initialises a new TestResultsExporter instance.

func (*TestResultsExporter) Ingest

func (e *TestResultsExporter) Ingest(ctx context.Context, input Inputs) (err error)

Ingest exports the provided test results to BigQuery.

func (TestResultsExporter) Name

func (TestResultsExporter) Name() string

Name returns a unique name for the ingestion stage.

Jump to

Keyboard shortcuts

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