Documentation ¶
Overview ¶
Package deriver implements a binary that hosts luci.resultdb.v1.Deriver service.
Index ¶
- func DeriveChromiumInvocation(task *swarmingAPI.SwarmingRpcsTaskResult, ...) (*pb.Invocation, error)
- func FetchOutputJSON(ctx context.Context, isoClient *isolatedclient.Client, ...) ([]byte, error)
- func GetInvocationID(task *swarmingAPI.SwarmingRpcsTaskResult, ...) invocations.ID
- func GetOriginTask(ctx context.Context, task *swarmingAPI.SwarmingRpcsTaskResult, ...) (*swarmingAPI.SwarmingRpcsTaskResult, error)
- func GetOutputs(ctx context.Context, isoClient *isolatedclient.Client, ...) (map[string]isolated.File, error)
- func GetSwarmSvc(cl *http.Client, swarmingURL string) (*swarmingAPI.Service, error)
- func GetSwarmingTask(ctx context.Context, taskID string, swarmSvc *swarmingAPI.Service) (*swarmingAPI.SwarmingRpcsTaskResult, error)
- func InitServer(srv *server.Server, opt Options)
- type Options
- type TestResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveChromiumInvocation ¶
func DeriveChromiumInvocation(task *swarmingAPI.SwarmingRpcsTaskResult, req *pb.DeriveChromiumInvocationRequest) (*pb.Invocation, error)
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 ¶
func GetInvocationID(task *swarmingAPI.SwarmingRpcsTaskResult, req *pb.DeriveChromiumInvocationRequest) invocations.ID
GetInvocationID gets the ID of the invocation associated with a task and swarming service.
func GetOriginTask ¶
func GetOriginTask(ctx context.Context, task *swarmingAPI.SwarmingRpcsTaskResult, swarmSvc *swarmingAPI.Service) (*swarmingAPI.SwarmingRpcsTaskResult, error)
GetOriginTask gets the swarming task of which the given task is a dupe, or itself if it isn't.
func GetOutputs ¶
func GetOutputs(ctx context.Context, isoClient *isolatedclient.Client, ref *swarmingAPI.SwarmingRpcsFilesRef) (map[string]isolated.File, error)
GetOutputs gets the map of isolated.Files associated with the given task.
func GetSwarmSvc ¶
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 ¶
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 ¶
func DeriveTestResults(ctx context.Context, task *swarmingAPI.SwarmingRpcsTaskResult, req *pb.DeriveChromiumInvocationRequest, inv *pb.Invocation) ([]*TestResult, error)
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.