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

fix: Walkfunc should check the err #460

Merged

Conversation

j4ckstraw
Copy link
Contributor

@j4ckstraw j4ckstraw commented Aug 10, 2022

Signed-off-by: j4ckstraw j4ckstraw@foxmail.com

Ⅰ. Describe what this PR does

Ⅱ. Does this pull request fix one issue?

fix #459

Ⅲ. 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

@j4ckstraw
Copy link
Contributor Author

fix #459

@codecov
Copy link

codecov bot commented Aug 10, 2022

Codecov Report

Merging #460 (420dc65) into main (aaead0f) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #460      +/-   ##
==========================================
- Coverage   67.97%   67.95%   -0.03%     
==========================================
  Files         155      155              
  Lines       16576    16579       +3     
==========================================
- Hits        11268    11266       -2     
- Misses       4474     4478       +4     
- Partials      834      835       +1     
Flag Coverage Δ
unittests 67.95% <0.00%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
pkg/koordlet/resmanager/cpu_suppress.go 72.34% <0.00%> (-0.59%) ⬇️
pkg/util/httputil/reverseproxy.go 84.84% <0.00%> (-0.54%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@saintube
Copy link
Member

@j4ckstraw Could you please add a unit test for this fix?

@j4ckstraw
Copy link
Contributor Author

@j4ckstraw Could you please add a unit test for this fix?

Let me try

@jasonliu747
Copy link
Member

@j4ckstraw any progress with this PR?

@j4ckstraw
Copy link
Contributor Author

@j4ckstraw any progress with this PR?

sorry, I am busy recently.

BYW, Is it really need a test?

@jasonliu747
Copy link
Member

BYW, Is it really need a test?

Actually no, but we would love to see the code coverage getting higher. We can still merge this PR if you want, it's your call, please let me know.

@saintube
Copy link
Member

@j4ckstraw any progress with this PR?

sorry, I am busy recently.

BYW, Is it really need a test?

We will appreciate it if you can make a testable patch and help us avoid regression.

@j4ckstraw
Copy link
Contributor Author

I have a problem when try to write a test for this function.

I know that if the path which stat call is not found, the Walk function will return error.
BUT rootCgroupPath is checked before walk, so I can't reproduce this error conveniently. https://github.com/koordinator-sh/koordinator/blob/main/pkg/koordlet/resmanager/cpu_suppress.go#L78

Now I can reproduce only in race condition, I have no idea to write a test for it. help!

@jasonliu747
Copy link
Member

Hi @j4ckstraw, please rebase to the latest code. Codecov won't be a problem anymore, we can merge this PR then.

Signed-off-by: j4ckstraw <j4ckstraw@foxmail.com>
@jasonliu747
Copy link
Member

@j4ckstraw have you joined our DingTalk or WeChat group? I would like to discuss further cooperation with you~

Copy link
Member

@jasonliu747 jasonliu747 left a comment

Choose a reason for hiding this comment

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

/lgtm

@j4ckstraw
Copy link
Contributor Author

@j4ckstraw have you joined our DingTalk or WeChat group? I would like to discuss further cooperation with you~

Not yet, It would be my pleasure.

@jasonliu747
Copy link
Member

Not yet, It would be my pleasure.

Nice! You can find our DingTalk QR Code in README

@j4ckstraw
Copy link
Contributor Author

Not yet, It would be my pleasure.

Nice! You can find our DingTalk QR Code in README
Got it, I have joined in it.

@hormes
Copy link
Member

hormes commented Aug 25, 2022

/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hormes

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

@koordinator-bot koordinator-bot bot merged commit d5e4534 into koordinator-sh:main Aug 25, 2022
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.

[BUG] Walkfunc should check error
4 participants