Documentation

Overview

Package deriver implements a binary that hosts luci.resultdb.v1.Deriver service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeriveChromiumInvocation

DeriveChromiumInvocation derives the Invocation proto from the given task and request.

The derived Invocation will be written by the caller.

func FetchOutputJSON

func FetchOutputJSON(ctx context.Context, isoClient *isolatedclient.Client, outputs map[string]isolated.File) ([]byte, error)

FetchOutputJSON fetches the output.json given the outputs map, updating it in-place to mark the file as processed.

func GetInvocationID

GetInvocationID gets the ID of the invocation associated with a task and swarming service.

func GetOriginTask

GetOriginTask gets the swarming task of which the given task is a dupe, or itself if it isn't.

func GetOutputs

GetOutputs gets the map of isolated.Files associated with the given task.

func GetSwarmSvc

func GetSwarmSvc(cl *http.Client, swarmingURL string) (*swarmingAPI.Service, error)

GetSwarmSvc gets a swarming service for the given URL.

func GetSwarmingTask

func GetSwarmingTask(ctx context.Context, taskID string, swarmSvc *swarmingAPI.Service) (*swarmingAPI.SwarmingRpcsTaskResult, error)

GetSwarmingTask fetches the task from swarming, annotating errors with gRPC codes as needed.

func InitServer

func InitServer(srv *server.Server, opt Options)

InitServer initializes a deriver server.

Types

type Options

type Options struct {
	// BigQuery table that the derived invocations should be exported to.
	InvBQTable *pb.BigQueryExport

	// Duration since invocation creation after which to delete expected test
	// results.
	ExpectedResultsExpiration time.Duration
}

Options is deriver server configuration.

type TestResult

type TestResult struct {
	*pb.TestResult
	Artifacts []*pb.Artifact
}

TestResult combines test result with the associated artifacts.

func DeriveTestResults

DeriveTestResults derives the protos with the data from the given task and request.

The derived Invocation and TestResult protos will be written by the caller.

Directories

Path Synopsis
formats
util