Swarming endpoints. Includes builds and logs.
build.go - Ingests annotee
build_test.go - Tests for build.go
buildLog.go - Displays build logs
memoryClient.go - In memory butler client for annotee
html.go - Plain ol' html endpoints
- func AddBanner(build *ui.MiloBuildLegacy, tags strpair.Map)
- func AddProjectInfo(build *ui.MiloBuildLegacy, tags strpair.Map)
- func AddRecipeLink(build *ui.MiloBuildLegacy, tags strpair.Map)
- func GetBuild(c context.Context, host, taskID string) (*ui.MiloBuildLegacy, error)
- func GetLog(c context.Context, host, taskID, logname string) (text string, closed bool, err error)
- func RedirectsFromTask(c context.Context, host, taskID string) (int64, string, error)
- func SwarmingBuildImpl(c context.Context, svc swarmingService, taskID string) (*ui.MiloBuildLegacy, error)
- func TaskPageURL(swarmingHostname, taskID string) *url.URL
- type BuildID
const ( // TaskRunning means task is running. TaskRunning = "RUNNING" // TaskPending means task didn't start yet. TaskPending = "PENDING" // TaskExpired means task expired and did not start. TaskExpired = "EXPIRED" // TaskTimedOut means task started, but took too long. TaskTimedOut = "TIMED_OUT" // TaskBotDied means task started but bot died. TaskBotDied = "BOT_DIED" // TaskCanceled means the task was canceled. See CompletedTs to determine whether it was started. TaskCanceled = "CANCELED" // TaskKill means the task was canceled. See CompletedTs to determine whether it was started. TaskKilled = "KILLED" // TaskCompleted means task is complete. TaskCompleted = "COMPLETED" // TaskNoResource means there was not enough capacity when scheduled, so the // task failed immediately. TaskNoResource = "NO_RESOURCE" )
Swarming task states..
const SwarmingTimeLayout = "2006-01-02T15:04:05.999999999"
SwarmingTimeLayout is time layout used by swarming.
const URLBase = "/swarming/task"
URLBase is the routing prefix for swarming endpoints. It's here so that it can be a constant between the swarmingURLBuilder and the frontend.
var ErrNotMiloJob = errors.New("Not a Milo Job or access denied", grpcutil.PermissionDeniedTag)
ErrNotMiloJob is returned if a Swarming task is fetched that does not self- identify as a Milo job.
AddBanner adds an OS banner derived from "os" swarming tag, if present.
func AddProjectInfo ¶
AddProjectInfo adds the luci_project swarming tag to the build.
func AddRecipeLink ¶
AddRecipeLink adds links to the recipe to the build.
GetBuild returns a milo build from a swarming task id.
GetLog loads a step log.
func RedirectsFromTask ¶
RedirectsFromTask returns either
* The ID of the buildbucket build corresponding to this task. OR * The build.proto logdog stream from this swarming task.
If the task does not represent a buildbucket build, returns (0, "", nil).
func SwarmingBuildImpl ¶
SwarmingBuildImpl fetches data from Swarming and LogDog and produces a resp.MiloBuildLegacy representation of a build state given a Swarming TaskID.