Skip to content

Commit 23899c6

Browse files
erock2112Skia Commit-Bot
authored and
Skia Commit-Bot
committed
[infra] gen_tasks: Fix TODOs in usesGit()
This removes the "work" cache from tasks which should not need it, and adds the "git" cache to all tasks which use Git. Change-Id: Ie3e5e964d77db44db869030ba195a50e27b75e70 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275996 Reviewed-by: Ben Wagner aka dogben <[email protected]> Commit-Queue: Eric Boren <[email protected]>
1 parent e65c5fc commit 23899c6

File tree

3 files changed

+67
-39
lines changed

3 files changed

+67
-39
lines changed

infra/bots/gen_tasks_logic/gen_tasks_logic.go

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,21 +1012,20 @@ func (b *jobBuilder) compile() string {
10121012
recipe := "compile"
10131013
isolate := "compile.isolate"
10141014
var props map[string]string
1015-
needSync := false
10161015
if b.extraConfig("NoDEPS", "CMake", "CommandBuffer", "Flutter", "SKQP") {
10171016
recipe = "sync_and_compile"
10181017
isolate = "swarm_recipe.isolate"
10191018
props = EXTRA_PROPS
1020-
needSync = true
1021-
}
1022-
b.kitchenTask(recipe, props, OUTPUT_BUILD)
1023-
b.isolate(isolate)
1024-
b.serviceAccount(b.cfg.ServiceAccountCompile)
1025-
if needSync {
10261019
b.usesGit()
1020+
if !b.extraConfig("NoDEPS") {
1021+
b.cache(CACHES_WORKDIR...)
1022+
}
10271023
} else {
10281024
b.idempotent()
10291025
}
1026+
b.kitchenTask(recipe, props, OUTPUT_BUILD)
1027+
b.isolate(isolate)
1028+
b.serviceAccount(b.cfg.ServiceAccountCompile)
10301029
b.swarmDimensions()
10311030
if b.extraConfig("Docker", "LottieWeb", "SKQP", "CMake") || b.compiler("EMCC") {
10321031
b.usesDocker()
@@ -1110,6 +1109,7 @@ func (b *jobBuilder) recreateSKPs() {
11101109
fmt.Sprintf("os:%s", DEFAULT_OS_LINUX_GCE),
11111110
)
11121111
b.usesGo()
1112+
b.cache(CACHES_WORKDIR...)
11131113
b.timeout(4 * time.Hour)
11141114
})
11151115
}
@@ -1125,6 +1125,7 @@ func (b *jobBuilder) checkGeneratedFiles() {
11251125
b.asset("clang_linux")
11261126
b.asset("ccache_linux")
11271127
b.usesCCache()
1128+
b.cache(CACHES_WORKDIR...)
11281129
})
11291130
}
11301131

@@ -1135,6 +1136,7 @@ func (b *jobBuilder) housekeeper() {
11351136
b.serviceAccount(b.cfg.ServiceAccountHousekeeper)
11361137
b.linuxGceDimensions(MACHINE_TYPE_SMALL)
11371138
b.usesGit()
1139+
b.cache(CACHES_WORKDIR...)
11381140
})
11391141
}
11401142

@@ -1207,6 +1209,7 @@ func (b *jobBuilder) buildstats() {
12071209
b.linuxGceDimensions(MACHINE_TYPE_MEDIUM)
12081210
b.usesDocker()
12091211
b.usesGit()
1212+
b.cache(CACHES_WORKDIR...)
12101213
})
12111214
// Upload release results (for tracking in perf)
12121215
// We have some jobs that are FYI (e.g. Debug-CanvasKit, tree-map generator)

infra/bots/gen_tasks_logic/task_builder.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,7 @@ func (b *taskBuilder) usesCCache() {
192192

193193
// usesGit adds attributes to tasks which use git.
194194
func (b *taskBuilder) usesGit() {
195-
// TODO(borenet): Why aren't these tasks using the Git cache?
196-
if !b.extraConfig("UpdateGoDeps", "BuildTaskDrivers", "CreateDockerImage", "PushAppsFromSkiaDockerImage", "PushAppsFromSkiaWASMDockerImages", "PushAppsFromWASMDockerImage") {
197-
b.cache(CACHES_GIT...)
198-
// TODO(borenet): Move this conditional into compile().
199-
if !b.extraConfig("NoDEPS") {
200-
b.cache(CACHES_WORKDIR...)
201-
}
202-
}
195+
b.cache(CACHES_GIT...)
203196
b.cipd(specs.CIPD_PKGS_GIT...)
204197
}
205198

infra/bots/tasks.json

Lines changed: 56 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3938,10 +3938,6 @@
39383938
{
39393939
"name": "vpython",
39403940
"path": "cache/vpython"
3941-
},
3942-
{
3943-
"name": "work",
3944-
"path": "cache/work"
39453941
}
39463942
],
39473943
"cipd_packages": [
@@ -5262,10 +5258,6 @@
52625258
{
52635259
"name": "vpython",
52645260
"path": "cache/vpython"
5265-
},
5266-
{
5267-
"name": "work",
5268-
"path": "cache/work"
52695261
}
52705262
],
52715263
"cipd_packages": [
@@ -5350,10 +5342,6 @@
53505342
{
53515343
"name": "vpython",
53525344
"path": "cache/vpython"
5353-
},
5354-
{
5355-
"name": "work",
5356-
"path": "cache/work"
53575345
}
53585346
],
53595347
"cipd_packages": [
@@ -14685,6 +14673,14 @@
1468514673
},
1468614674
"Housekeeper-Nightly-UpdateGoDeps": {
1468714675
"caches": [
14676+
{
14677+
"name": "git",
14678+
"path": "cache/git"
14679+
},
14680+
{
14681+
"name": "git_cache",
14682+
"path": "cache/git_cache"
14683+
},
1468814684
{
1468914685
"name": "go_cache",
1469014686
"path": "cache/go_cache"
@@ -14780,10 +14776,6 @@
1478014776
{
1478114777
"name": "vpython",
1478214778
"path": "cache/vpython"
14783-
},
14784-
{
14785-
"name": "work",
14786-
"path": "cache/work"
1478714779
}
1478814780
],
1478914781
"cipd_packages": [
@@ -14947,6 +14939,14 @@
1494714939
},
1494814940
"Housekeeper-PerCommit-BuildTaskDrivers": {
1494914941
"caches": [
14942+
{
14943+
"name": "git",
14944+
"path": "cache/git"
14945+
},
14946+
{
14947+
"name": "git_cache",
14948+
"path": "cache/git_cache"
14949+
},
1495014950
{
1495114951
"name": "go_cache",
1495214952
"path": "cache/go_cache"
@@ -15169,6 +15169,14 @@
1516915169
{
1517015170
"name": "docker",
1517115171
"path": "cache/docker"
15172+
},
15173+
{
15174+
"name": "git",
15175+
"path": "cache/git"
15176+
},
15177+
{
15178+
"name": "git_cache",
15179+
"path": "cache/git_cache"
1517215180
}
1517315181
],
1517415182
"cipd_packages": [
@@ -15246,6 +15254,14 @@
1524615254
{
1524715255
"name": "docker",
1524815256
"path": "cache/docker"
15257+
},
15258+
{
15259+
"name": "git",
15260+
"path": "cache/git"
15261+
},
15262+
{
15263+
"name": "git_cache",
15264+
"path": "cache/git_cache"
1524915265
}
1525015266
],
1525115267
"cipd_packages": [
@@ -15339,10 +15355,6 @@
1533915355
{
1534015356
"name": "vpython",
1534115357
"path": "cache/vpython"
15342-
},
15343-
{
15344-
"name": "work",
15345-
"path": "cache/work"
1534615358
}
1534715359
],
1534815360
"cipd_packages": [
@@ -15446,10 +15458,6 @@
1544615458
{
1544715459
"name": "vpython",
1544815460
"path": "cache/vpython"
15449-
},
15450-
{
15451-
"name": "work",
15452-
"path": "cache/work"
1545315461
}
1545415462
],
1545515463
"cipd_packages": [
@@ -15686,6 +15694,14 @@
1568615694
{
1568715695
"name": "docker",
1568815696
"path": "cache/docker"
15697+
},
15698+
{
15699+
"name": "git",
15700+
"path": "cache/git"
15701+
},
15702+
{
15703+
"name": "git_cache",
15704+
"path": "cache/git_cache"
1568915705
}
1569015706
],
1569115707
"cipd_packages": [
@@ -15758,6 +15774,14 @@
1575815774
{
1575915775
"name": "docker",
1576015776
"path": "cache/docker"
15777+
},
15778+
{
15779+
"name": "git",
15780+
"path": "cache/git"
15781+
},
15782+
{
15783+
"name": "git_cache",
15784+
"path": "cache/git_cache"
1576115785
}
1576215786
],
1576315787
"cipd_packages": [
@@ -15831,6 +15855,14 @@
1583115855
{
1583215856
"name": "docker",
1583315857
"path": "cache/docker"
15858+
},
15859+
{
15860+
"name": "git",
15861+
"path": "cache/git"
15862+
},
15863+
{
15864+
"name": "git_cache",
15865+
"path": "cache/git_cache"
1583415866
}
1583515867
],
1583615868
"cipd_packages": [

0 commit comments

Comments
 (0)