Commit f516361
authored
fix(ci): treat an unreadable cache size as unstable when settling (#7274)
The settle loop initialised prev='' and, after 4795d04 made total() return
empty on failure, two consecutive failed `buildctl du` reads compared equal and
tripped the stability counter. The loop then exited after ~2s instead of its
120s bound — exactly when du is failing and the prune is most likely still
deleting, which is the case the wait exists to cover. Handing back early there
risks the builder post-step SIGKILLing buildkitd and skipping the sticky disk
commit.
An empty reading can only mean du failed. buildctl prints its `Total:` line
unconditionally (cmd/buildctl/diskusage.go), so an empty cache still reports
`Total: 0B` and settles normally. Guarding on a non-empty reading therefore
costs nothing in the healthy paths: verified a steady value and an empty cache
both still exit after 3 iterations, while a persistently failing du now waits
out all 60.
Reported by cubic on #7273.1 parent 2cda264 commit f516361
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
146 | 153 | | |
147 | 154 | | |
148 | 155 | | |
| |||
0 commit comments