GoogleCloudPlatform / GoogleCloudPlatform/gsutil

Processed file size not captured when copying from stdin

Open
#1,334 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
918
Forks
335
PR merge metrics
No merged PRs in 30d

Description

This is confusing as there is data uploaded to the object but the output shows zero.

Example:
```
$ echo test | gsutil cp - gs:///test.txt
Copying from ...
/ [1 files][ 0.0 B/ 0.0 B]
Operation completed over 1 objects.
```

If the total size cannot be calculated, the uploaded size should still be displayed like:
`/ [1 files][ 5.0 B/ - ]`

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with `echo test | gsutil cp - gs:///test.txt`, then trace the `cp` path for stdin uploads and progress reporting. Done means the progress output reports the uploaded byte count while leaving the total size unknown, as in the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.