Documentation
¶
Index ¶
- Variables
- func BuildAddress(build *buildbucketpb.Build) string
- func CIService(c context.Context) (*ui.CIService, error)
- func GetBuildPage(ctx *router.Context, br buildbucketpb.GetBuildRequest, forceBlamelist bool) (*ui.BuildPage, error)
- func GetBuildSummary(c context.Context, id int64) (*model.BuildSummary, error)
- func GetBuilder(c context.Context, bid BuilderID, limit int, cursor string) (*ui.BuilderLegacy, error)
- func GetBuilderID(c context.Context, id int64) (builder *buildbucketpb.BuilderID, number int32, err error)
- func GetBuilders(c context.Context) (*swarmbucket.LegacySwarmbucketApiGetBuildersResponseMessage, error)
- func GetSwarmingTaskID(c context.Context, buildAddress string) (host, taskID string, err error)
- func MakeBuildBugLink(bt *config.BugTemplate, data interface{}) (string, error)
- func MakeBuildKey(c context.Context, host, buildAddress string) *datastore.Key
- func ProdClientFactory(c context.Context, host string, as auth.RPCAuthorityKind, ...) (buildbucketpb.BuildsClient, error)
- func PubSubHandler(ctx *router.Context)
- func ToMiloBuild(c context.Context, msg *bbv1.LegacyApiCommonBuildMessage) (*ui.MiloBuildLegacy, error)
- func UpdatePools(c context.Context) error
- func WithClientFactory(c context.Context, factory clientFactory) context.Context
- type BuilderID
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 GetBuildPage ¶
func GetBuildPage(ctx *router.Context, br buildbucketpb.GetBuildRequest, forceBlamelist bool) (*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 GetBuilder ¶
func GetBuilder(c context.Context, bid BuilderID, limit int, cursor string) (*ui.BuilderLegacy, error)
GetBuilder is used by buildsource.BuilderID.Get to obtain the resp.Builder.
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 GetBuilders ¶
func GetBuilders(c context.Context) (*swarmbucket.LegacySwarmbucketApiGetBuildersResponseMessage, error)
GetBuilders returns all Swarmbucket builders, cached for current identity.
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 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 ProdClientFactory ¶
func ProdClientFactory(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 ToMiloBuild ¶
func ToMiloBuild(c context.Context, msg *bbv1.LegacyApiCommonBuildMessage) (*ui.MiloBuildLegacy, error)
ToMiloBuild converts a v1 buildbucket build to a milo build. Does not make RPCs. In case of an error, returns a build with a description of the error and logs the error.
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.