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

add cpu qos and mv nodeslo informer to states informer #153

Merged
merged 1 commit into from
May 23, 2022
Merged

add cpu qos and mv nodeslo informer to states informer #153

merged 1 commit into from
May 23, 2022

Conversation

zwzhang0107
Copy link
Contributor

@zwzhang0107 zwzhang0107 commented May 19, 2022

Ⅰ. Describe what this PR does

#154

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

@jasonliu747
Copy link
Member

@zwzhang0107 can you split this into separate PRs? one for CPU QoS, and the other for states_informer.

@codecov-commenter
Copy link

codecov-commenter commented May 19, 2022

Codecov Report

Merging #153 (c409a87) into main (0cf1616) will increase coverage by 0.67%.
The diff coverage is 45.77%.

@@            Coverage Diff             @@
##             main     #153      +/-   ##
==========================================
+ Coverage   56.89%   57.56%   +0.67%     
==========================================
  Files          86       89       +3     
  Lines        7887     7953      +66     
==========================================
+ Hits         4487     4578      +91     
+ Misses       3006     2979      -27     
- Partials      394      396       +2     
Flag Coverage Δ
unittests 57.56% <45.77%> (+0.67%) ⬆️

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

Impacted Files Coverage Δ
pkg/koordlet/runtimehooks/config.go 14.28% <ø> (ø)
pkg/util/config.go 0.00% <0.00%> (ø)
pkg/koordlet/statesinformer/states_node.go 27.58% <27.58%> (ø)
pkg/koordlet/statesinformer/states_informer.go 35.71% <33.89%> (+27.49%) ⬆️
pkg/koordlet/statesinformer/states_pod.go 40.90% <40.90%> (ø)
pkg/koordlet/statesinformer/states_nodeslo.go 83.80% <71.60%> (ø)
pkg/koordlet/statesinformer/register.go 73.07% <73.07%> (ø)
pkg/koordlet/resmanager/resmanager.go 58.11% <100.00%> (+1.42%) ⬆️
pkg/koordlet/runtimehooks/runtimehooks.go 51.61% <100.00%> (+7.16%) ⬆️
pkg/util/system/util_test_tool.go 56.17% <0.00%> (+2.84%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0cf1616...c409a87. Read the comment docs.

@zwzhang0107
Copy link
Contributor Author

it's already a separation of group identity hook implement(#154), since cpu qos definition dose not include much logic

pkg/util/config.go Outdated Show resolved Hide resolved
@jasonliu747
Copy link
Member

jasonliu747 commented May 19, 2022

could you also fix #77 in this PR? Thanks

return
}
for _, c := range callbacks {
klog.Infof("start running callback function %v for type %v", c.name, objType)
Copy link
Member

Choose a reason for hiding this comment

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

Is this supposed to be a v(x) log ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

)

var singleton StatesInformer
Copy link
Member

Choose a reason for hiding this comment

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

Could you avoid using singleton pattern?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@zwzhang0107
Copy link
Contributor Author

could you also fix #77 in this PR? Thanks

done

func (s *statesInformer) RegisterCallbacks(objType reflect.Type, name, description string, callbackFn UpdateCbFn) {
callbacks, legal := s.stateUpdateCallbacks[objType]
if !legal {
panic(fmt.Sprintf("states informer callback register with type %v is illegal", objType))
Copy link
Member

Choose a reason for hiding this comment

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

how about klog.Fatalf()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

Signed-off-by: zwzhang0107 <zuoweizhang@outlook.com>
@jasonliu747 jasonliu747 linked an issue May 21, 2022 that may be closed by this pull request
@saintube
Copy link
Member

/lgtm

@hormes
Copy link
Member

hormes commented May 23, 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 d6de2aa into koordinator-sh:main May 23, 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] data race in states_informer_test.go
5 participants