feat(cmd): Run image operations with progress#330
Draft
craciunoiuc wants to merge 3 commits into
Draft
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Bubble Tea–based progress UI for image load/save operations, similar to the existing download progress bar, so pushes/pulls can show a colored progress indicator when running in a terminal.
Changes:
- Introduces
RunWithImageProgressand animgprogresstracker that aggregates per-descriptor progress into a single progress bar. - Improves terminal detection for progress output by unwrapping
colorprofile.Writerto the underlying TTY writer. - Wraps image load/save paths in
buildandimage copycommands with the new progress runner.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/tui/progdl/tracker.go | New image-progress runner and tracker that feeds progress updates to Bubble Tea. |
| internal/tui/progdl/model.go | Adjusts key handling for the progress UI. |
| internal/tui/progdl/download.go | Enhances TTY detection/unwrapping for Bubble Tea output. |
| internal/cmd/images.go | Wraps image copy load/save with image progress UI. |
| internal/cmd/build.go | Wraps build image save with image progress UI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Implements the 'Update' function and exposes function to run a writer with a progress bar. Uses 'x/image-spec'. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
Adapts both 'build' and 'image inspect' to have progress bars for tracking the status of OCI pushes/pulls. Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
814c16f to
0ad4f56
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a simple colored progress bar for tracking pushes/pulls.
Closes: TOOL-636
Depends on: unikraft-cloud/x#165
Needs rebase after that is merged.