Skip to content

[Bug]: container image push progress stays at 0% until a whole blob is uploaded #967

Open

Description

@ttys3

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

  1. Build an image with at least one large layer (a few hundred MB).
  2. Push it to a registry over a link with limited upload bandwidth: container image push <reference>.
  3. Watch the progress line while the large layer is being uploaded.

Current behavior

The percentage only moves when the blob count moves. In the log below the push stayed at 0% for almost two minutes while the upload was actually running at about 1.3 MiB/s, then jumped straight to 13% when the count went from 5 of 11 blobs to 6 of 11 blobs.

Two minutes at 0% looks like the network is down or the upload is not working.

The cause is in ImageStore.ExportOperation.pushContent: it reports .addSize(descriptor.size) only after client.push(...) has returned for the whole blob, and RegistryClient.push never calls the progress handler it receives, although its documentation says it is invoked as data is sent. A pull, in contrast, reports the bytes as it receives them (RegistryClient+Fetch.swift).

Expected behavior

The percentage advances as the bytes of a blob are uploaded, the same way it does during a pull.

Environment

- OS: macOS 27.0.1 (26A434)
- Xcode: 27.0 (27A266a)
- Swift: Apple Swift version 6.4 (swiftlang-6.4.0.34.1 clang-2100.3.34.1)
- container CLI: 1.5.0 (uses containerization 0.47.0)
- The same code is in containerization 0.50.0 and on main (fcc92dd).

Relevant log output

Pushing image example.com/foo/bar:local-e565548-20261815105747 0% (5 of 11 blobs) [1m 58s]
Pushing image example.com/foo/bar:local-e565548-20261815105747 13% (6 of 11 blobs) [2m 53s]

Code of Conduct

  • I agree to follow this project's Code of Conduct

A fix is proposed in #966.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions