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

pkg: fix read cpu quota from cgroup v2 #6296

Merged
merged 6 commits into from Apr 13, 2023
Merged

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Apr 10, 2023

What problem does this PR solve?

Issue Number: Close #6262.

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Apr 10, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JmPotato

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot
Copy link
Member

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot added release-note-none do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Apr 10, 2023
@codecov
Copy link

codecov bot commented Apr 10, 2023

Codecov Report

Patch coverage: 71.79% and project coverage change: +0.14 🎉

Comparison is base (ab0dbdc) 74.96% compared to head (1c32cd3) 75.11%.

❗ Current head 1c32cd3 differs from pull request most recent head 6537eea. Consider uploading reports for the commit 6537eea to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6296      +/-   ##
==========================================
+ Coverage   74.96%   75.11%   +0.14%     
==========================================
  Files         404      404              
  Lines       39736    39748      +12     
==========================================
+ Hits        29789    29855      +66     
+ Misses       7319     7279      -40     
+ Partials     2628     2614      -14     
Flag Coverage Δ
unittests 75.11% <71.79%> (+0.14%) ⬆️

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

Impacted Files Coverage Δ
pkg/cgroup/cgroup_memory.go 76.08% <50.00%> (-10.93%) ⬇️
pkg/cgroup/cgroup_cpu.go 76.08% <85.18%> (-2.04%) ⬇️
pkg/cgroup/cgroup.go 71.42% <100.00%> (+1.69%) ⬆️

... and 43 files with indirect coverage changes

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

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

@rleungx rleungx marked this pull request as ready for review April 11, 2023 08:40
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 11, 2023
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@rleungx rleungx requested review from nolouch and removed request for HunDunDM April 11, 2023 09:58
Copy link
Member

@JmPotato JmPotato left a comment

Choose a reason for hiding this comment

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

LGTM. Any real-environment test?

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 12, 2023
@rleungx
Copy link
Member Author

rleungx commented Apr 12, 2023

LGTM. Any real-environment test?

For now, we only have a unit test, which failed before. After this PR, it passes.

@rleungx
Copy link
Member Author

rleungx commented Apr 12, 2023

/cc @hawkingrei

@ti-chi-bot
Copy link
Member

@rleungx: GitHub didn't allow me to request PR reviews from the following users: hawkingrei.

Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @hawkingrei

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.

@rleungx rleungx added the require-LGT1 Indicates that the PR requires an LGTM. label Apr 13, 2023
@ti-chi-bot
Copy link
Member

@hawkingrei: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In 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 ti-community-infra/tichi repository.

@rleungx
Copy link
Member Author

rleungx commented Apr 13, 2023

/merge

@ti-chi-bot
Copy link
Member

@rleungx: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 1c32cd3

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 13, 2023
@ti-chi-bot
Copy link
Member

@rleungx: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot merged commit cb3bd5f into tikv:master Apr 13, 2023
19 checks passed
@rleungx rleungx deleted the fix-cgroup1 branch April 13, 2023 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none require-LGT1 Indicates that the PR requires an LGTM. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestGetCgroupCPU is not supported in some environments
4 participants