luci: go.chromium.org/luci/resultdb/internal/services/deriver Index | Files | Directories

package deriver

import "go.chromium.org/luci/resultdb/internal/services/deriver"

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

Index

Package Files

derive_invocation.go deriver.go doc.go invocation.go swarming.go

func DeriveChromiumInvocation Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

GetSwarmSvc gets a swarming service for the given URL.

func GetSwarmingTask Uses

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 Uses

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

InitServer initializes a deriver server.

type Options Uses

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 Uses

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

TestResult combines test result with the associated artifacts.

func DeriveTestResults Uses

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.

Directories

PathSynopsis
formats
util

Package deriver imports 46 packages (graph) and is imported by 1 packages. Updated 2020-09-30. Refresh now. Tools for package owners.