-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track object upload status through a progress bar #697
base: main
Are you sure you want to change the base?
Track object upload status through a progress bar #697
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: priyanshikhetwani The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @priyanshikhetwani. Thanks for your PR. I'm waiting for a ppc64le-cloud member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
0759f25
to
f4cc742
Compare
/ok-to-test |
/lgtm Thanks for the PR @priyanshikhetwani! :) |
f4cc742
to
e3ed182
Compare
e3ed182
to
b036d19
Compare
9c938cd
to
fe3098e
Compare
fb14afc
to
40d0bb1
Compare
/lgtm |
40d0bb1
to
2579a90
Compare
New changes are detected. LGTM label has been removed. |
2579a90
to
04fb640
Compare
04fb640
to
c696292
Compare
What happened:
RFE:
Convert upload size to the nearest KB/MB/GB, rather than bytes.
During image upload, the size is represented in bytes which can be better represented in KB/MB/GB based on the corresponding object that is being uploaded.
pvsadm/pkg/client/s3client.go
Lines 255 to 261 in ee4d801
if _, ok := r.signMap[off]; ok {
r.read += int64(n)
progress := int(float32(r.read*100) / float32(r.size))
fmt.Printf("\rUploading: Total read(bytes):%d progress:%d%%", r.read, progress)
} else {
r.signMap[off] = struct{}{}
}
This can further be improved by introducing a progress bar:
https://github.com/vbauerster/mpb
Test: