Documentation ¶
Overview ¶
Package buildstatus provides the build status computation related functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StatusWithDetails ¶
type StatusWithDetails struct { Status pb.Status Details *pb.StatusDetails }
type Updater ¶
type Updater struct { Build *model.Build Infra *model.BuildInfra BuildStatus *StatusWithDetails OutputStatus *StatusWithDetails TaskStatus *StatusWithDetails SucceedBuildIfTaskSucceeded bool UpdateTime time.Time PostProcess func(c context.Context, bld *model.Build, inf *model.BuildInfra) error }
func (*Updater) Do ¶
Do updates the top level build status, and performs actions when build status changes: * it updates the corresponding BuildStatus entity for the build; * it triggers PubSub notify task; * if the build is ended, it triggers BQ export task.
Note that pubsub notification on build start will not retry on failure.
Must be run inside a transaction.
The post-processes that should happen after the status update is committed is not included, and the callsite needs to handle them separately. These include: * update build event metrics * cancel descendent builds when this build is ended.