Documentation ¶
Index ¶
- Variables
- func CIService(c context.Context) (*ui.CIService, error)
- func GetBuild(c context.Context, address string, fetchFull bool) (*ui.MiloBuild, error)
- func GetBuildSummary(c context.Context, id int64) (*model.BuildSummary, error)
- func GetBuilder(c context.Context, bid BuilderID, limit int, cursor string) (*ui.Builder, error)
- func GetBuilders(c context.Context) (*swarmbucket.SwarmingSwarmbucketApiGetBuildersResponseMessage, error)
- func GetRawBuild(c context.Context, address string) (*bbv1.ApiCommonBuildMessage, error)
- func GetSwarmingTaskID(c context.Context, buildAddress string) (host, taskId string, err error)
- func MakeBuildKey(c context.Context, host, buildAddress string) *datastore.Key
- func PubSubHandler(ctx *router.Context)
- func ToMiloBuild(c context.Context, b *bbv1.ApiCommonBuildMessage, fetchFull bool) (*ui.MiloBuild, error)
- func UpdatePools(c context.Context) error
- type BuilderID
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.Reason("Build not found").Tag(common.CodeNotFound).Err()
Functions ¶
func GetBuildSummary ¶
GetBuildSummary fetches a build summary where the Context URI matches the given address.
func GetBuilder ¶
GetBuilder is used by buildsource.BuilderID.Get to obtain the resp.Builder.
func GetBuilders ¶
func GetBuilders(c context.Context) (*swarmbucket.SwarmingSwarmbucketApiGetBuildersResponseMessage, error)
GetBuilders returns all Swarmbucket builders, cached for current identity.
func GetRawBuild ¶
GetRawBuild fetches a buildbucket build given its address.
func GetSwarmingTaskID ¶
GetSwarmingTaskID returns the swarming task ID of a buildbucket build. TODO(hinoka): BuildInfo and Skia requires this. Remove this when buildbucket v2 is out and Skia is on Kitchen. TODO(nodir): delete this. It is used only in deprecated BuildInfo API.
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 PubSubHandler ¶
PubSubHandler is a webhook that stores the builds coming in from pubsub.
func ToMiloBuild ¶
func ToMiloBuild(c context.Context, b *bbv1.ApiCommonBuildMessage, fetchFull bool) (*ui.MiloBuild, error)
ToMiloBuild converts a raw buildbucket build to a milo build.
Returns an error only on failure to reach buildbucket. Other errors are surfaced in the returned build.
TODO(hinoka): Some of this can be done concurrently. Investigate if this call takes >500ms on average. TODO(crbug.com/850113): stop loading steps from logdog.
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.
Types ¶
type BuilderID ¶
type BuilderID struct { // BuilderID is the buildbucket v2 representation of the builder ID. Note // that the v2 representation uses short bucket names. buildbucketpb.BuilderID }
BuilderID represents a buildbucket builder. We wrap the underlying representation since we represent builder IDs slightly differently in Milo vs. Buildbucket. I.E. Builders can source from either BuildBot or Buildbucket.
func NewBuilderID ¶
NewBuilderID does what it says.