Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: go/src/infra/tools/kitchen/cook.go

Issue 2174103002: Kitchen: always emit annotations if teeing. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | go/src/infra/tools/kitchen/cook_logdog.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import ( 7 import (
8 "encoding/json" 8 "encoding/json"
9 "fmt" 9 "fmt"
10 "io/ioutil" 10 "io/ioutil"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 224 }
225 225
226 // Let infra_path recipe module know that we are using swarmbucket paths . 226 // Let infra_path recipe module know that we are using swarmbucket paths .
227 // Relevant code: 227 // Relevant code:
228 // https://chromium.googlesource.com/chromium/tools/depot_tools/+/248331 450c05c59c8e966c806f00bd2475e36603/recipe_modules/infra_paths/api.py#12 228 // https://chromium.googlesource.com/chromium/tools/depot_tools/+/248331 450c05c59c8e966c806f00bd2475e36603/recipe_modules/infra_paths/api.py#12
229 // https://chromium.googlesource.com/chromium/tools/depot_tools/+/248331 450c05c59c8e966c806f00bd2475e36603/recipe_modules/infra_paths/path_config.py#57 229 // https://chromium.googlesource.com/chromium/tools/depot_tools/+/248331 450c05c59c8e966c806f00bd2475e36603/recipe_modules/infra_paths/path_config.py#57
230 props["path_config"] = "swarmbucket" 230 props["path_config"] = "swarmbucket"
231 231
232 // If we're not using LogDog, send out annotations. 232 // If we're not using LogDog, send out annotations.
233 bootstapSuccess := true 233 bootstapSuccess := true
234 » if !c.logdog.active() { 234 » if !c.logdog.emitAnnotations() {
235 if c.Timestamps { 235 if c.Timestamps {
236 annotateTime(ctx) 236 annotateTime(ctx)
237 } 237 }
238 annotate("SEED_STEP", BootstrapStepName) 238 annotate("SEED_STEP", BootstrapStepName)
239 annotate("STEP_CURSOR", BootstrapStepName) 239 annotate("STEP_CURSOR", BootstrapStepName)
240 if c.Timestamps { 240 if c.Timestamps {
241 annotateTime(ctx) 241 annotateTime(ctx)
242 } 242 }
243 annotate("STEP_STARTED") 243 annotate("STEP_STARTED")
244 defer func() { 244 defer func() {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 } 302 }
303 303
304 func annotateTime(ctx context.Context) { 304 func annotateTime(ctx context.Context) {
305 timestamp := clock.Get(ctx).Now().Unix() 305 timestamp := clock.Get(ctx).Now().Unix()
306 annotate("CURRENT_TIMESTAMP", strconv.FormatInt(timestamp, 10)) 306 annotate("CURRENT_TIMESTAMP", strconv.FormatInt(timestamp, 10))
307 } 307 }
308 308
309 func annotate(args ...string) { 309 func annotate(args ...string) {
310 fmt.Printf("@@@%s@@@\n", strings.Join(args, "@")) 310 fmt.Printf("@@@%s@@@\n", strings.Join(args, "@"))
311 } 311 }
OLDNEW
« no previous file with comments | « no previous file | go/src/infra/tools/kitchen/cook_logdog.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698