1
0
mirror of https://github.com/containers/image.git synced 2025-09-21 03:22:00 +03:00

13 Commits

Author SHA1 Message Date
Colin Walters
b18499a3c1 copy: Don't print "skipped: 0.0b = 0.00%"
I think this is just visually noisy. If we didn't do a partial
fetch then let's just not say anything about it.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-09-20 09:03:24 -04:00
Kir Kolyshkin
e2e81f25c2 Simplify codespellrc, fix remaining typos
Current .codespellrc contains too many exclusions, and as a result it
misses some legitimate typos.

A few previous commits silenced or fixed some of the codespell warnings
in preparation for this one, which minimizes exclusions, and fixes the
actual remaining typos.

The fixes here are the result of codespell -w.

./copy/sign_test.go:119: overidden ==> overridden
./copy/encryption.go:51: pratice ==> practice
./copy/multiple_test.go:80: crated ==> created
./copy/progress_bars.go:124: progres ==> progress

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-08-02 13:37:53 -07:00
Giuseppe Scrivano
b47707f7e1 docker: support for requesting chunks without end offset
if the specified length for the range is set to -1, then request all
the data possible by using the "Range: <unit>=<range-start>-" syntax
for the HTTP range.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-05-14 10:37:08 +02:00
Miloslav Trmač
04deef6fe6 Call .Validate() before digest.Hex() / digest.Encoded()
... to prevent panics if the value does not contain a :, or other unexpected
values (e.g. a path traversal).

Don't bother on paths where we computed the digest ourselves, or it is already trusted
for other reasons.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-05-09 15:59:32 +02:00
Miloslav Trmač
6d895d0f97 Provide data to correctly report throughput on partial pulls
Per https://github.com/containers/podman/issues/20634#issuecomment-1960164114 .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-02-22 21:26:39 +01:00
Philippe Vlérick
5366ceb39f Adding IO decorator to copy progress bar
Signed-off-by: Philippe Vlérick <pvlerick@gmail.com>
2023-06-29 10:53:59 +02:00
Miloslav Trmač
f43fe85e9e Remove duplicate words in comments
golangci-lint linter: dupword

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-02-06 21:22:09 +01:00
Miloslav Trmač
2b39e35107 Update to github.com/vbauerster/mpb/v8
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-02-01 18:44:45 +01:00
Valentin Rothberg
51a1ee6227 copy: print copy info once when writer==io.Discard
When the writer is set to `io.Discard` make sure to print the
`Copying ...` output once.  The partial pull attempt caused
the line to be printed twice rendering the output of
`podman-remote pull ...` a bit too verbose.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-07-20 17:12:30 +02:00
Miloslav Trmač
f090300aca Add progressBar.mark100PercentComplete, and use it on all progress bars
This correctly handles both the "size known" and the "size unknown" cases,
and because we now record the originally-configured progress bar size
in the progressBar struct, the caller doesn't need to track it.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-04-27 18:17:30 +02:00
Miloslav Trmač
c444bc3149 Wrap a *mpb.Bar in a *progressBar
This will allow us to add more state and methods to the bar
object, without copy&pasting.

For now, this just wraps one pointer in another, and should
not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-04-27 18:16:14 +02:00
Miloslav Trmač
9c46add002 Move blobChunkAccessorProxy to copy/progress_bars.go
Second part: Move blobChunkAccessorProxy to the newly established
progress_bars.go.

Only moves unchanged code, should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-04-27 18:16:14 +02:00
Miloslav Trmač
66100ac0e2 Move progress-bar-specific utilities from copy.go to new progress_bars.go
Let's try to make copy.go shorter, and consolidate progress bar code to
new copy/progress_bars.go.

First, move the code from copy.go.

Only moves unchanged code, should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-04-27 18:16:09 +02:00