buildevent

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package buildevent defines BigQuery schemas and table definitions to use for build events.

Index

Constants

View Source
const (
	// ResultUnknown and associated Result* values are suitable for the "Result"
	// enum field in CompletedBuildsLegacy and BuildEventsLegacy.
	ResultUnknown = ""
	// ResultSuccess is a successful build result.
	ResultSuccess = "SUCCESS"
	// ResultFailure is a failed build result.
	ResultFailure = "FAILURE"
	// ResultInfraFailure is a failed build result attributed to infrastructure.
	ResultInfraFailure = "INFRA_FAILURE"
	// ResultWarning is a successful build result with a noted warning.
	ResultWarning = "WARNING"
	// ResultSkipped indicates that the build was not executed.
	ResultSkipped = "SKIPPED"
	// ResultRetry indicates that a build should be retried.
	ResultRetry = "RETRY"
)
View Source
const (
	// CategoryUnknown and associated Category* values are suitable for the
	// "Category" enum field in CompletedBuildsLegacy.
	CategoryUnknown = ""
	// CategoryCQ is a scheduling category for the commit queue.
	CategoryCQ = "CQ"
	// CategoryCQExperimental is a scheduling category for an experimental commit
	// queue.
	CategoryCQExperimental = "CQ_EXPERIMENTAL"
	// CategoryGitCLTry is a scheduling category for the "git cl try" command.
	CategoryGitCLTry = "GIT_CL_TRY"
)

Variables

View Source
var BuildsTable = &pb.TableDef{
	DatasetId: "",
	TableId:   "builds",
}

BuildsTable is the TableDef for the "" dataset's "builds" table.

View Source
var CompletedBuildsLegacyTable = &pb.TableDef{
	DatasetId: "raw_events",
	TableId:   "completed_builds_legacy",
}

CompletedBuildsLegacyTable is the TableDef for the "raw_events" dataset's "completed_builds_legacy" table.

View Source
var CompletedStepLegacyTable = &pb.TableDef{
	DatasetId: "raw_events",
	TableId:   "completed_step_legacy",
}

CompletedStepLegacyTable is the TableDef for the "raw_events" dataset's "completed_step_legacy" table.

View Source
var StepsTable = &pb.TableDef{
	DatasetId: "",
	TableId:   "steps",
}

StepsTable is the TableDef for the "" dataset's "steps" table.

Functions

This section is empty.

Types

type Builds

type Builds struct {
	// An unique identifier of the build. On Buildbucket, it has format "buildbucket/<buildbucket host>/<buildbucket build id>". On Buildbot, it has format "buildbot/<master>/<builder>/<number>". Other tables may also have build_id field to reference this row.
	BuildId string `bigquery:"build_id"`

	// The buildbucket bucket.
	Bucket string `bigquery:"bucket"`

	// The name of the builder. Unique within the bucket.
	Builder string `bigquery:"builder"`

	// The build number, unique within the builder. May be not present.
	Number int64 `bigquery:"number"`

	// When the buildbucket build was created.
	CreationTime time.Time `bigquery:"creation_time"`

	// When a bot started bootstrapping the build.
	StartTime time.Time `bigquery:"start_time"`

	// The build completion time.
	CompletionTime time.Time `bigquery:"completion_time"`

	// The host name of the machine that runs the build.
	HostName string `bigquery:"host_name"`

	// The build status. Valid value are SUCCESS, FAILURE, ERROR, TIMEOUT, CANCELLED
	Status string `bigquery:"status"`

	// Buildset, format documented in go/buildbucket-buildset. Identifies a patchset.
	Buildset []string `bigquery:"buildset"`

	// Build input
	Input *Builds_Input `bigquery:"input"`

	// Build output
	Output *Builds_Output `bigquery:"output"`

	// Swarming information.
	Swarming *Builds_Swarming `bigquery:"swarming"`
}

Builds is the schema for "BuildsTable".

type Builds_Input

type Builds_Input struct {
	// Input user-defined list of key-value pairs.
	Properties []*Builds_Properties `bigquery:"properties"`
}

Builds_Input is a record for the "input" field.

type Builds_Output

type Builds_Output struct {
	// Output user-defined list of key-value pairs.
	Properties []*Builds_Properties `bigquery:"properties"`
}

Builds_Output is a record for the "output" field.

type Builds_Properties

type Builds_Properties struct {
	Key string `bigquery:"key"`

	ValueJson string `bigquery:"value_json"`
}

Builds_Properties is a record for the "properties" field.

type Builds_Swarming

type Builds_Swarming struct {
	// The host name of the swarming server.
	Host string `bigquery:"host"`

	// The run ID (zero out last digit for task ID).
	RunId string `bigquery:"run_id"`
}

Builds_Swarming is a record for the "swarming" field.

type CompletedBuildsLegacy

type CompletedBuildsLegacy struct {
	// The name of the BuildBot master.
	Master string `bigquery:"master"`

	// The name of the BuildBot builder.
	Builder string `bigquery:"builder"`

	// The BuildBot build number.
	BuildNumber int64 `bigquery:"build_number"`

	// The build schedule time, in milliseconds from epoch.
	BuildSchedMsec int64 `bigquery:"build_sched_msec"`

	// The build started time, in milliseconds from epoch.
	BuildStartedMsec int64 `bigquery:"build_started_msec"`

	// The build finished time, in milliseconds from epoch.
	BuildFinishedMsec int64 `bigquery:"build_finished_msec"`

	// The builder host name.
	HostName string `bigquery:"host_name"`

	// The build result (enum).
	Result string `bigquery:"result"`

	// The queue duration, in seconds.
	QueueDurationS float64 `bigquery:"queue_duration_s"`

	// The execution duration, in seconds.
	ExecutionDurationS float64 `bigquery:"execution_duration_s"`

	// The total duration, in seconds.
	TotalDurationS float64 `bigquery:"total_duration_s"`

	// The patch URL.
	PatchUrl string `bigquery:"patch_url"`

	// The build's project.
	Project string `bigquery:"project"`

	// The build category (enum).
	Category string `bigquery:"category"`

	// The BuildBucket ID.
	BbucketId string `bigquery:"bbucket_id"`

	// The BuildBucket user agent.
	BbucketUserAgent string `bigquery:"bbucket_user_agent"`

	// The head revision's Git hash.
	HeadRevisionGitHash string `bigquery:"head_revision_git_hash"`

	// An identifier unique to this build. Shared with 'build_id' in steps table.
	BuildId string `bigquery:"build_id"`

	// The BuildBucket bucket.
	BbucketBucket string `bigquery:"bbucket_bucket"`

	// The time when the build was scheduled.
	BuildScheduled time.Time `bigquery:"build_scheduled"`

	// The time when the build was started.
	BuildStarted time.Time `bigquery:"build_started"`

	// The time when the build was finished.
	BuildFinished time.Time `bigquery:"build_finished"`

	// Swarming information.
	Swarming *CompletedBuildsLegacy_Swarming `bigquery:"swarming"`

	// Kitchen information.
	Kitchen *CompletedBuildsLegacy_Kitchen `bigquery:"kitchen"`

	// Recipe information.
	Recipes *CompletedBuildsLegacy_Recipes `bigquery:"recipes"`
}

CompletedBuildsLegacy is the schema for "CompletedBuildsLegacyTable".

type CompletedBuildsLegacy_Deps

type CompletedBuildsLegacy_Deps struct {
	ProjectId string `bigquery:"project_id"`

	// The URL of where to fetch the package data. Must always be a git repo URL.
	Url string `bigquery:"url"`

	// The ref to git-fetch when syncing this dependency.
	Branch string `bigquery:"branch"`

	// The git commit that we depend on.
	Revision string `bigquery:"revision"`
}

CompletedBuildsLegacy_Deps is a record for the "deps" field.

type CompletedBuildsLegacy_Kitchen

type CompletedBuildsLegacy_Kitchen struct {
	// The Kitchen package version.
	Version string `bigquery:"version"`
}

CompletedBuildsLegacy_Kitchen is a record for the "kitchen" field.

type CompletedBuildsLegacy_Recipes

type CompletedBuildsLegacy_Recipes struct {
	// The recipe repository, if checked out.
	Repository string `bigquery:"repository"`

	// The recipe repository's revision, if checked out.
	Revision string `bigquery:"revision"`

	// The recipe name that was invoked.
	Name string `bigquery:"name"`

	// List of recipe packages the recipe depends on.
	Deps []*CompletedBuildsLegacy_Deps `bigquery:"deps"`
}

CompletedBuildsLegacy_Recipes is a record for the "recipes" field.

type CompletedBuildsLegacy_Swarming

type CompletedBuildsLegacy_Swarming struct {
	// The host name.
	Host string `bigquery:"host"`

	// The run ID (zero out last digit for task ID).
	RunId string `bigquery:"run_id"`
}

CompletedBuildsLegacy_Swarming is a record for the "swarming" field.

type CompletedStepLegacy

type CompletedStepLegacy struct {
	// The name of the BuildBot master.
	Master string `bigquery:"master"`

	// The name of the BuildBot builder.
	Builder string `bigquery:"builder"`

	// The BuildBot build number.
	BuildNumber int64 `bigquery:"build_number"`

	// The build schedule time, in milliseconds from epoch.
	BuildSchedMsec int64 `bigquery:"build_sched_msec"`

	// The name of this step.
	StepName string `bigquery:"step_name"`

	// Step text output.
	StepText string `bigquery:"step_text"`

	// The ordinal of this step, relative to other steps in the build.
	StepNumber int64 `bigquery:"step_number"`

	// The builder host name.
	HostName string `bigquery:"host_name"`

	// The step result (enum).
	Result string `bigquery:"result"`

	// The step's started time, in milliseconds from epoch.
	StepStartedMsec int64 `bigquery:"step_started_msec"`

	// The step's duration, in seconds.
	StepDurationS float64 `bigquery:"step_duration_s"`

	// The patch URL.
	PatchUrl string `bigquery:"patch_url"`

	// The build's project.
	Project string `bigquery:"project"`

	// The BuildBucket ID.
	BbucketId string `bigquery:"bbucket_id"`

	// The BuildBucket user agent.
	BbucketUserAgent string `bigquery:"bbucket_user_agent"`

	// An identifier unique to this build. Shared with 'build_id' in builds table.
	BuildId string `bigquery:"build_id"`

	// The time when the step started.
	StepStarted time.Time `bigquery:"step_started"`

	// The time when the step finished.
	StepFinished time.Time `bigquery:"step_finished"`
}

CompletedStepLegacy is the schema for "CompletedStepLegacyTable".

type Steps

type Steps struct {
	// An unique identifier of the build. See build_id in completed_builds table.
	BuildId string `bigquery:"build_id"`

	// The name of this step. Fields build_id and step_name uniquely identify a step.
	StepName string `bigquery:"step_name"`

	// The step result. Valid values: "SUCCESS", "FAILURE", "EXCEPTION".
	Result string `bigquery:"result"`

	// The step's started time.
	StartTime time.Time `bigquery:"start_time"`

	// The step's finish time.
	FinishTime time.Time `bigquery:"finish_time"`
}

Steps is the schema for "StepsTable".

Jump to

Keyboard shortcuts

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