Esempio n. 1
0
func updateWebappTask() {
	if frontend.CTFE_V2 {
		vars := frontend.ChromiumPerfUpdateVars{}
		vars.Id = *gaeTaskID
		vars.SetCompleted(taskCompletedSuccessfully)
		vars.Results = sql.NullString{String: htmlOutputLink, Valid: true}
		vars.NoPatchRawOutput = sql.NullString{String: noPatchOutputLink, Valid: true}
		vars.WithPatchRawOutput = sql.NullString{String: withPatchOutputLink, Valid: true}
		skutil.LogErr(frontend.UpdateWebappTaskV2(&vars))
		return
	}
	// TODO(rmistry): Add ability to update the webapp without providing links.
	extraData := map[string]string{
		"skia_patch_link":              skiaPatchLink,
		"blink_patch_link":             blinkPatchLink,
		"chromium_patch_link":          chromiumPatchLink,
		"telemetry_nopatch_log_link":   noPatchOutputLink,
		"telemetry_withpatch_log_link": withPatchOutputLink,
		"html_output_link":             htmlOutputLink,
		"build_log_link":               util.MASTER_LOGSERVER_LINK,
	}
	if err := frontend.UpdateWebappTask(*gaeTaskID, frontend.UpdateChromiumPerfTasksWebapp, extraData); err != nil {
		glog.Errorf("Error while updating webapp task: %s", err)
		return
	}
}
Esempio n. 2
0
func updateWebappTask() {
	if frontend.CTFE_V2 {
		vars := frontend.LuaScriptUpdateVars{}
		vars.Id = *gaeTaskID
		vars.SetCompleted(taskCompletedSuccessfully)
		vars.ScriptOutput = sql.NullString{String: luaOutputRemoteLink, Valid: true}
		if luaAggregatorOutputRemoteLink != "" {
			vars.AggregatedOutput = sql.NullString{String: luaAggregatorOutputRemoteLink, Valid: true}
		}
		skutil.LogErr(frontend.UpdateWebappTaskV2(&vars))
		return
	}
	outputLink := luaOutputRemoteLink
	if luaAggregatorOutputRemoteLink != "" {
		// Use the aggregated output if it exists.
		outputLink = luaAggregatorOutputRemoteLink
	}
	extraData := map[string]string{
		"lua_script_link":     luaScriptRemoteLink,
		"lua_aggregator_link": luaAggregatorRemoteLink,
		"lua_output_link":     outputLink,
	}
	if err := frontend.UpdateWebappTask(*gaeTaskID, frontend.UpdateLuaTasksWebapp, extraData); err != nil {
		glog.Errorf("Error while updating webapp task: %s", err)
		return
	}
}
Esempio n. 3
0
func updateWebappTask() {
	vars := chromium_perf.UpdateVars{}
	vars.Id = *gaeTaskID
	vars.SetCompleted(taskCompletedSuccessfully)
	vars.Results = sql.NullString{String: htmlOutputLink, Valid: true}
	vars.NoPatchRawOutput = sql.NullString{String: noPatchOutputLink, Valid: true}
	vars.WithPatchRawOutput = sql.NullString{String: withPatchOutputLink, Valid: true}
	skutil.LogErr(frontend.UpdateWebappTaskV2(&vars))
}
Esempio n. 4
0
func updateWebappTask() {
	vars := lua_scripts.UpdateVars{}
	vars.Id = *gaeTaskID
	vars.SetCompleted(taskCompletedSuccessfully)
	if luaOutputRemoteLink != "" {
		vars.ScriptOutput = sql.NullString{String: luaOutputRemoteLink, Valid: true}
	}
	if luaAggregatorOutputRemoteLink != "" {
		vars.AggregatedOutput = sql.NullString{String: luaAggregatorOutputRemoteLink, Valid: true}
	}
	skutil.LogErr(frontend.UpdateWebappTaskV2(&vars))
}
Esempio n. 5
0
func updateWebappTask() {
	if frontend.CTFE_V2 {
		vars := frontend.RecreatePageSetsUpdateVars{}
		vars.Id = *gaeTaskID
		vars.SetCompleted(*taskCompletedSuccessfully)
		skutil.LogErr(frontend.UpdateWebappTaskV2(&vars))
		return
	}
	if err := frontend.UpdateWebappTask(*gaeTaskID, frontend.UpdateAdminTasksWebapp, map[string]string{}); err != nil {
		glog.Errorf("Error while updating webapp task: %s", err)
		return
	}
}
Esempio n. 6
0
func updateWebappTask() {
	if frontend.CTFE_V2 {
		vars := frontend.CaptureSkpsUpdateVars{}
		vars.Id = *gaeTaskID
		vars.SetCompleted(taskCompletedSuccessfully)
		skutil.LogErr(frontend.UpdateWebappTaskV2(&vars))
		return
	}
	extraData := map[string]string{
		"output_link": outputRemoteLink,
	}
	if err := frontend.UpdateWebappTask(*gaeTaskID, frontend.UpdateCaptureSKPsTasksWebapp, extraData); err != nil {
		glog.Errorf("Error while updating webapp task: %s", err)
		return
	}
}
Esempio n. 7
0
func updateWebappTask() {
	if frontend.CTFE_V2 {
		vars := frontend.ChromiumBuildUpdateVars{}
		vars.Id = *gaeTaskID
		vars.SetCompleted(taskCompletedSuccessfully)
		skutil.LogErr(frontend.UpdateWebappTaskV2(&vars))
		return
	}
	extraData := map[string]string{
		"chromium_rev_date": chromiumBuildTimestamp,
		"build_log_link":    util.MASTER_LOGSERVER_LINK,
	}
	if err := frontend.UpdateWebappTask(*gaeTaskID, frontend.UpdateChromiumBuildTasksWebapp, extraData); err != nil {
		glog.Errorf("Error while updating webapp task: %s", err)
		return
	}
}
Esempio n. 8
0
func updateWebappTask() {
	vars := admin_tasks.RecreatePageSetsUpdateVars{}
	vars.Id = *gaeTaskID
	vars.SetCompleted(*taskCompletedSuccessfully)
	skutil.LogErr(frontend.UpdateWebappTaskV2(&vars))
}
Esempio n. 9
0
// Notifies the frontend that task failed.
func updateWebappTaskSetFailed(task Task) error {
	updateVars := task.GetUpdateTaskVars()
	updateVars.GetUpdateTaskCommonVars().Id = task.GetCommonCols().Id
	updateVars.GetUpdateTaskCommonVars().SetCompleted(false)
	return frontend.UpdateWebappTaskV2(updateVars)
}
Esempio n. 10
0
func updateWebappTask() {
	vars := chromium_builds.UpdateVars{}
	vars.Id = *gaeTaskID
	vars.SetCompleted(taskCompletedSuccessfully)
	skutil.LogErr(frontend.UpdateWebappTaskV2(&vars))
}