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

koord-scheduler: support score schedulingPhase hook and multiple hook #627

Merged

Conversation

ZiMengSheng
Copy link
Contributor

@ZiMengSheng ZiMengSheng commented Sep 16, 2022

Signed-off-by: wangjianyu zmsjianyu@gmail.com

Ⅰ. Describe what this PR does

SchedulingPhase hook can give us the ability to hook the PreFilter&Filter&Score plugins and hook plugin parameter and return value. In some over-commitment scenario, we can use this to give all plugins unified resource view.
We noticed koodinator have support PreFilter&Filter phase hook, but support only one hook each each phase. This PR supports multiple hook each phase and supplies score hook.

Ⅱ. Does this pull request fix one issue?

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

@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Base: 68.86% // Head: 69.11% // Increases project coverage by +0.24% 🎉

Coverage data is based on head (28ca5c3) compared to base (cda2754).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #627      +/-   ##
==========================================
+ Coverage   68.86%   69.11%   +0.24%     
==========================================
  Files         191      191              
  Lines       22110    22119       +9     
==========================================
+ Hits        15227    15288      +61     
+ Misses       5823     5771      -52     
  Partials     1060     1060              
Flag Coverage Δ
unittests 69.11% <100.00%> (+0.24%) ⬆️

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

Impacted Files Coverage Δ
pkg/scheduler/frameworkext/framework_extender.go 61.81% <100.00%> (+61.81%) ⬆️
...r/plugins/elasticquota/core/group_quota_manager.go 91.40% <0.00%> (-1.40%) ⬇️
pkg/util/httputil/reverseproxy.go 85.10% <0.00%> (+0.79%) ⬆️

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@eahydra eahydra left a comment

Choose a reason for hiding this comment

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

please add UT.

@jasonliu747
Copy link
Member

这是干什么的?能简单说一下不?asking for a friend.
/cc @cheimu

Signed-off-by: wangjianyu <zmsjianyu@gmail.com>
@ZiMengSheng
Copy link
Contributor Author

ZiMengSheng commented Sep 16, 2022

这是干什么的?能简单说一下不?asking for a friend. /cc @cheimu

主要是在调度插件被调用前后做一些事情。之前koordinator已经支持了FilterPhaseHook和PreFilterPhaseHook。这个PR工作是支持每个plugin调用前后可以执行多个hook,并且补充了ScorePhaseHook

Copy link
Member

@eahydra eahydra left a comment

Choose a reason for hiding this comment

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

/lgtm

@hormes
Copy link
Member

hormes commented Sep 16, 2022

/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eahydra, 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 cb796ea into koordinator-sh:main Sep 16, 2022
@ZiMengSheng ZiMengSheng deleted the support_socrephase_hook branch January 13, 2023 03:26
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.

None yet

4 participants