Skip to content
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

koordlet: fix node memory collection #1392

Conversation

saintube
Copy link
Member

@saintube saintube commented Jun 15, 2023

Ⅰ. Describe what this PR does

  • Fix a bug of the metrics advisor in which the node memory usage in NodeMetric shows as kilo-bytes while the other fields use bytes.
  • Add UTs for node resource collector to avoid regression.
  • Revise logs and error handling in the states informer.

Ⅱ. Does this pull request fix one issue?

Fixed the bug in koordlet's node resource collector (introduced in #1316).

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

@saintube
Copy link
Member Author

/cc @zwzhang0107 @jasonliu747 @LambdaHJ

@koordinator-bot koordinator-bot bot requested a review from LambdaHJ June 15, 2023 06:43
@saintube saintube force-pushed the koordlet-fix-nodemetric-memory-unit branch from 7fb1012 to bb3c525 Compare June 15, 2023 06:49
@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Patch coverage: 43.63% and project coverage change: -0.02 ⚠️

Comparison is base (f833fd9) 64.50% compared to head (bcad6b8) 64.49%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1392      +/-   ##
==========================================
- Coverage   64.50%   64.49%   -0.02%     
==========================================
  Files         330      331       +1     
  Lines       33905    33990      +85     
==========================================
+ Hits        21872    21921      +49     
- Misses      10427    10460      +33     
- Partials     1606     1609       +3     
Flag Coverage Δ
unittests 64.49% <43.63%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/koordlet/statesinformer/states_pods.go 60.10% <0.00%> (-1.56%) ⬇️
pkg/koordlet/statesinformer/states_nodemetric.go 53.36% <40.00%> (-0.35%) ⬇️
...collectors/noderesource/node_resource_collector.go 64.55% <80.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@saintube saintube force-pushed the koordlet-fix-nodemetric-memory-unit branch from bb3c525 to 99a69d6 Compare June 15, 2023 07:27
@saintube saintube force-pushed the koordlet-fix-nodemetric-memory-unit branch from 99a69d6 to 07c7be8 Compare June 15, 2023 08:48
@saintube saintube force-pushed the koordlet-fix-nodemetric-memory-unit branch from 07c7be8 to 4704ce2 Compare June 15, 2023 08:52
Copy link
Contributor

@LambdaHJ LambdaHJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@saintube saintube force-pushed the koordlet-fix-nodemetric-memory-unit branch from 4704ce2 to 731e45e Compare June 15, 2023 09:37
@koordinator-bot koordinator-bot bot removed the lgtm label Jun 15, 2023
@saintube saintube force-pushed the koordlet-fix-nodemetric-memory-unit branch from 731e45e to f682a03 Compare June 15, 2023 09:57
@saintube saintube force-pushed the koordlet-fix-nodemetric-memory-unit branch from f682a03 to bcad6b8 Compare June 15, 2023 10:05
@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hormes, jasonliu747

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hormes
Copy link
Member

hormes commented Jun 16, 2023

/lgtm

@koordinator-bot koordinator-bot bot added the lgtm label Jun 16, 2023
@koordinator-bot koordinator-bot bot merged commit 0f1d1a2 into koordinator-sh:main Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants