feat: report push phase transitions during OCI image export#2797
Open
markphelps wants to merge 3 commits intomainfrom
Open
feat: report push phase transitions during OCI image export#2797markphelps wants to merge 3 commits intomainfrom
markphelps wants to merge 3 commits intomainfrom
Conversation
During OCI push, the Docker image export phase (docker save → temp tarball) was completely silent — the user saw nothing while potentially large images were exported. This adds phase reporting through the existing PushProgress callback so the CLI can display status messages during the export. Rather than adding a separate callback, PushProgress is extended with a Phase field. Phase-only updates (Phase set, byte fields zero) signal transitions between exporting and pushing; byte-progress updates (Phase empty) report per-layer upload progress as before. This keeps a single callback contract for all push progress.
Phase transitions (exporting, pushing) now print via console.Infof for pretty CLI formatting, while per-layer progress bars continue using the JSON progress writer.
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.
Summary
docker save→ temp tarball) was completely silent — the user saw nothing while potentially large images were exported to disk before chunked upload began.PushProgresswith aPhasefield so phase transitions (exporting → pushing) flow through the existing single callback, and the CLI displays status messages likeExporting image from Docker daemon...during the silent export phase.Design
Rather than adding a separate
PhaseFncallback andImagePhaseFnoption (which would double the callback surface),PushProgressnow carries two kinds of updates through one channel:PhaseLayerDigest/ byte fields"exporting")The CLI dispatches on
prog.Phase != ""to show status-only lines vs progress bars — both rendered through the existingProgressWriter.Changes
pkg/model/push_helpers.go— AddedPushPhasetype withPushPhaseExportingandPushPhasePushingconstants; extendedPushProgresswithPhasefieldpkg/model/image_pusher.go— Emit phase callbacks via existingprogressFnat export start and push startpkg/model/pusher.go— UpdatedPushOptions.ImageProgressFndocs to reflect unified contractpkg/cli/push.go— Handle phase updates in the progress callback, showing status lines during exportpkg/model/image_pusher_test.go— Updated test to verify both phase transitions and byte progress