Skip to content

image-builder: reuse progress bars for upload - #2592

Open
croissanne wants to merge 3 commits into
osbuild:mainfrom
croissanne:progress-upload
Open

image-builder: reuse progress bars for upload#2592
croissanne wants to merge 3 commits into
osbuild:mainfrom
croissanne:progress-upload

Conversation

@croissanne

Copy link
Copy Markdown
Member

Using the proxy reader and the ability to restart progress bars, the
progress bars can be used for uploads as well.

@croissanne
croissanne force-pushed the progress-upload branch 5 times, most recently from f73a84c to 084b213 Compare August 12, 2026 15:46
@croissanne
croissanne marked this pull request as ready for review August 13, 2026 10:31
@croissanne
croissanne requested a review from a team as a code owner August 13, 2026 10:31
The terminal and file progress bars keep track of levels of
progress. When stopping (and restarting) the progress bar, these levels
need to be cleared in order to accurately show the progress of the next
bigger step (which is assumed to be separate from the first). For
instance, build and upload.
This reader keeps a reference to a progress bar, updating it as bytes
are read from the underlying `io.Reader`. This is useful to use our
existing progress bars for uploads.
Using the proxy reader and the ability to restart progress bars, the
progress bars can be used for uploads as well.

@lzap lzap left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested this.

Comment thread pkg/progress/proxy_reader.go
@croissanne
croissanne marked this pull request as draft August 17, 2026 08:35
@croissanne

Copy link
Copy Markdown
Member Author

Alright, I changed it a bit to make the bar identical to the upload bar (which is just the default config with bytes true)

old:

progress-original

new:

progress-new

@croissanne
croissanne marked this pull request as ready for review August 17, 2026 10:38

@lzap lzap left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants