Documentation ¶
Index ¶
- Variables
- func BuildAddress(build *buildbucketpb.Build) string
- func CIService(c context.Context) (*ui.CIService, error)
- func CancelBuild(c context.Context, id int64, reason string) (*buildbucketpb.Build, error)
- func GetBuildPage(ctx *router.Context, br *buildbucketpb.GetBuildRequest, ...) (*ui.BuildPage, error)
- func GetBuildSummary(c context.Context, id int64) (*model.BuildSummary, error)
- func GetBuilderID(c context.Context, id int64) (builder *buildbucketpb.BuilderID, number int32, err error)
- func GetBuilderPage(c context.Context, bid *buildbucketpb.BuilderID, pageSize int, ...) (*ui.BuilderPage, error)
- func GetBuilders(c context.Context) (*swarmbucket.LegacySwarmbucketApiGetBuildersResponseMessage, error)
- func GetRelatedBuildsTable(c context.Context, buildbucketID int64) (*ui.RelatedBuildsTable, error)
- func MakeBuildBugLink(bt *config.BugTemplate, data interface{}) (string, error)
- func MakeBuildKey(c context.Context, host, buildAddress string) *datastore.Key
- func ProdBuildersClientFactory(c context.Context, host string, as auth.RPCAuthorityKind, ...) (buildbucketpb.BuildersClient, error)
- func ProdBuildsClientFactory(c context.Context, host string, as auth.RPCAuthorityKind, ...) (buildbucketpb.BuildsClient, error)
- func PubSubHandler(ctx *router.Context)
- func RetryBuild(c context.Context, buildbucketID int64, requestID string) (*buildbucketpb.Build, error)
- func UpdatePools(c context.Context) error
- func WithBuildersClientFactory(c context.Context, factory buildersClientFactory) context.Context
- func WithBuildsClientFactory(c context.Context, factory buildsClientFactory) context.Context
- type BlamelistOption
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = errors.Reason("Build not found").Tag(grpcutil.NotFoundTag).Err() ErrNotLoggedIn = errors.Reason("not logged in").Tag(grpcutil.UnauthenticatedTag).Err() )
Functions ¶
func BuildAddress ¶
func BuildAddress(build *buildbucketpb.Build) string
BuildAddress constructs the build address of a buildbucketpb.Build. This is used as the key for the BuildSummary entity.
func CancelBuild ¶
CancelBuild cancels the build with the given ID.
func GetBuildPage ¶
func GetBuildPage(ctx *router.Context, br *buildbucketpb.GetBuildRequest, blamelistOpt BlamelistOption) (*ui.BuildPage, error)
GetBuildPage fetches the full set of information for a Milo build page from Buildbucket. Including the blamelist and other auxiliary information.
func GetBuildSummary ¶
GetBuildSummary fetches a build summary where the Context URI matches the given address.
func GetBuilderID ¶
func GetBuilderID(c context.Context, id int64) (builder *buildbucketpb.BuilderID, number int32, err error)
GetBuilderID returns the builder, and maybe the build number, for a build id.
func GetBuilderPage ¶
func GetBuilderPage(c context.Context, bid *buildbucketpb.BuilderID, pageSize int, pageToken string) (*ui.BuilderPage, error)
GetBuilderPage computes a builder page data.
func GetBuilders ¶
func GetBuilders(c context.Context) (*swarmbucket.LegacySwarmbucketApiGetBuildersResponseMessage, error)
GetBuilders returns all Swarmbucket builders, cached for current identity.
func GetRelatedBuildsTable ¶
GetRelatedBuildsTable fetches all the related builds of the given build from Buildbucket.
func MakeBuildBugLink ¶
func MakeBuildBugLink(bt *config.BugTemplate, data interface{}) (string, error)
MakeBuildBugLink attempts to create the feedback link for the build page. If the project is not configured for a custom build bug link or an interpolation placeholder cannot be satisfied an empty string is returned.
func MakeBuildKey ¶
MakeBuildKey returns a new datastore Key for a buildbucket.Build.
There's currently no model associated with this key, but it's used as a parent for a model.BuildSummary.
func ProdBuildersClientFactory ¶
func ProdBuildersClientFactory(c context.Context, host string, as auth.RPCAuthorityKind, opts ...auth.RPCOption) (buildbucketpb.BuildersClient, error)
func ProdBuildsClientFactory ¶
func ProdBuildsClientFactory(c context.Context, host string, as auth.RPCAuthorityKind, opts ...auth.RPCOption) (buildbucketpb.BuildsClient, error)
func PubSubHandler ¶
PubSubHandler is a webhook that stores the builds coming in from pubsub.
func RetryBuild ¶
func RetryBuild(c context.Context, buildbucketID int64, requestID string) (*buildbucketpb.Build, error)
RetryBuild retries the build with the given ID and returns the new build.
func UpdatePools ¶
UpdatePools is a cron job endpoint that: 1. Fetches all the builders from our associated Swarmbucket instance. 2. Consolidates all known descriptors (host+dimensions), saves BuilderPool. 3. Fetches and saves BotPool data from swarming for all known descriptors.
func WithBuildersClientFactory ¶
WithBuildersClientFactory installs a buildbucket rpc builders client in the context.
Types ¶
type BlamelistOption ¶
type BlamelistOption int
BlamelistOption specifies whether the blamelist should be fetched as part of the build page request.
var ( // NoBlamelist means blamelist shouldn't be fetched. NoBlamelist BlamelistOption = 0 // GetBlamelist means blamelist should be fetched with a short timeout. GetBlamelist BlamelistOption = 1 // ForceBlamelist means blamelist should be fetched with a long timeout. ForceBlamelist BlamelistOption = 2 )