-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Extend image pull metrics #2912
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
Conversation
|
/test e2e_fedora |
2b6b3fe to
a7ba10d
Compare
|
/hold needs #2915 and the vendored changes to containers/image |
a7ba10d to
641d35c
Compare
|
Looks good for now, but still needs containers/image#738 to proceed. |
641d35c to
01098bd
Compare
01098bd to
4f7602d
Compare
|
This is ready for a first review. I think I will add some integration tests for it as well later on. |
|
/hold cancel |
b03c25a to
418a9b5
Compare
52a9bcd to
45899b2
Compare
|
/retest |
|
PTAL @smarterclayton |
|
PTAL @vrothberg @mtrmac |
|
Ping anyone wants to review this to unblock 1.17? 😇 @mrunalp @vrothberg @rhatdan @haircommander |
server/image_pull.go
Outdated
| wg := &sync.WaitGroup{} | ||
| progress := make(chan types.ProgressProperties) | ||
| wg.Add(1) | ||
| go func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Absolutely non-blocking: As an absolutely worthless personal opinion, I tend to avoid nested functions; moving them out makes the body shorter, and allows writing independent unit tests.
OTOH inlining them reads closer to a straight-line code. Feel completely free to leave this as is, as long as this is an intentional choice.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point and would generally agree. In this example I'd like to stick to the current approach to make the code easier to understand when having the critical parts close to each other :)
|
Thanks for the review @mtrmac, I applied my review related fixes in a dedicated commit on top of this PR. PTAL |
mtrmac
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one more thing about the goroutine.
We now add a new set of image pull metrics, which collect the transferred bytes per image name or digest every second during an image pull. We also add a metric which collects the skipped bytes if an image has already been downloaded. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
c233a3e to
aa9293e
Compare
|
I rebased on top of the latest master because this PR was a bit outdated. |
mtrmac
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mtrmac, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 similar comment
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mtrmac, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
LGTM |
|
/lgtm |
|
/retest |
|
/test integration_rhel |
|
/test kata-containers |
|
/cherrypick release-1.17 |
|
@saschagrunert: failed to push cherry-picked changes in GitHub: pushing failed, output: "To https://github.com/openshift-cherrypick-robot/cri-o\n ! [remote rejected] cherry-pick-2912-to-release-1.17 -> cherry-pick-2912-to-release-1.17 (cannot lock ref 'refs/heads/cherry-pick-2912-to-release-1.17': reference already exists)\nerror: failed to push some refs to 'https://openshift-cherrypick-robot:CENSORED@github.com/openshift-cherrypick-robot/cri-o'\n", error: exit status 1 DetailsIn response to this:
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/test-infra repository. |
|
@saschagrunert: new pull request created: #3122 DetailsIn response to this:
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/test-infra repository. |
We now add a new set of image pull metrics, which collect the transferred
bytes per image name or digest every second during an image pull. We
also add a metric which collects the skipped bytes if an image has
already been downloaded.
This fixes the ignored command line parameters for the metrics, too.
Example output from the metrics server:
Closes #2757
Related change: containers/image#732
Discussion on SIG Node: https://groups.google.com/forum/#!topic/kubernetes-sig-node/JHEus_TlZzA