Commit 48124b0
authored
deploy: fix progress bar math for containers-storage transport (#2067)
When pulling from containers-storage, layers are stored uncompressed but
the progress bar total was set from the manifest descriptor size
(compressed). This caused the display to show transferred exceeding
total, e.g. '2.66 GiB/1.14 GiB'.
Update the byte progress bar length from LayerProgress.total on each
update, which reflects the actual blob size for the transport. Also use
the bar's actual length for completion accounting so that total_read and
subtask bytes are consistent. This matches how ostree-ext's CLI handles
the same progress (cli.rs).
For registry pulls, LayerProgress.total equals the manifest descriptor
size, so this is a no-op in that case.
Closes: #2001
Signed-off-by: Andrew Dunn <andrew@dunn.dev>1 parent 5dd036d commit 48124b0
1 file changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
238 | 241 | | |
239 | | - | |
| 242 | + | |
240 | 243 | | |
241 | | - | |
| 244 | + | |
| 245 | + | |
242 | 246 | | |
243 | 247 | | |
244 | 248 | | |
| |||
268 | 272 | | |
269 | 273 | | |
270 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
271 | 279 | | |
| 280 | + | |
272 | 281 | | |
273 | 282 | | |
274 | 283 | | |
| |||
0 commit comments