What is the meaning of progress arrows in docker push?

Here is a screenshot of docker push command in (in)action:

I thought that the first and the fifth line indicate that a chunk was successfully uploaded. Unfortunately, after a few seconds, I see this:

Why these chunks are being retried?

I guess it almost finished pushing the image and something happened with the network. When pushing is almost done, for example 99.99 percent of the image was pushed, you could see the progress bar is at the last step. Until you see pushed or mounted from or Layer already existed, it is still pushing and can fail.

I leave the link here to the other topic if someone wants to answer the network issue part

1 Like

The progress bar is only one of the two indicators. I was also looking at numerical values to the right, too. When I see 3.245MB/12.09MB it is clear upload is in progress. When I see 8.192kB it suggests that the whole chunk was uploaded (100%). Perhaps the server had a problem digesting it.

There was no percentage shown in your screenshot, but even if it were, the number could be rounded. Don’t expect perfect accuracy. Even when you download something in your webbrowser it could show you 100% was downloaded, although the last pieces are still being downloaded. That diagram in the console just helps you to see approximately how long you have to wait.

The question remains, why it couldn’t finish and why it stopped right before finishing it. This is what we can discuss in the other topic.

Since this post is about user interface, I made the comment about my experience. It’s not about accuracy or 99% being too close to 100% to visualize using a text based terminal. One of the signals displayed for the user is the change in notation from xMB/yMB to xMB at the end of each line. This transition should indicate completion of chunk upload. I don’t see any other state change warranting it. 100MB/100MB means very close to 100% completion, but not done yet. 100MB means done. Let me know if you think otherwise.

The original post was about the “arrows”, not the numbers, but you are right, you wrote about the numbers in the post that I replied to. To be honest, I don’t know exactly what those numbers show.

Without checking the sourcecode I can’t tell when the progressbar will switch from number/number to just one number, so it may be wrong the same way as the rest of the diagram when it is close to 100%, but as I wrote above, I simply don’t know the answer. Before you pointing it out, I haven’t even noticed it :slight_smile:

If you think this behavior is a bug, you can report it on GitHub. Or maybe someone will tell you how it works exactly if we can’t tell you here.