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: clarify framework extender #1066

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

eahydra
Copy link
Member

@eahydra eahydra commented Mar 1, 2023

Ⅰ. Describe what this PR does

The internal concepts of the frameworkext package of koord-scheduler are somewhat confusing and need some clarification.

  • ExtenderFactory is responsible for creating Extender.
  • Extender implements ExtendedHandle, which means the extension of framework.Handle, and implements some functions of framework.Framework, responsible for intercepting some function calls. The Extender corresponds to each profile, and some transformers inside each Extender are initialized through the type assert mechanism when the plugin is built.
  • Rename the Hook class interface to Transformer, which can better express the actual meaning.
  • In most scenarios, the global transformer is basically not needed. If necessary, the necessary global transformer (also called default transformer) can be registered with frameworkext.
  • In the previous implementation, we did not give the default implementation of the sharedLister adapter, but this time we added it.

Ⅱ. 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 Mar 1, 2023

Codecov Report

Patch coverage: 82.33% and project coverage change: +0.15 🎉

Comparison is base (b66fbe0) 67.25% compared to head (6687964) 67.40%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1066      +/-   ##
==========================================
+ Coverage   67.25%   67.40%   +0.15%     
==========================================
  Files         255      258       +3     
  Lines       28619    28684      +65     
==========================================
+ Hits        19248    19335      +87     
+ Misses       8031     8002      -29     
- Partials     1340     1347       +7     
Flag Coverage Δ
unittests 67.40% <82.33%> (+0.15%) ⬆️

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

Impacted Files Coverage Δ
...ameworkext/sharedlisterext/sharedlister_adapter.go 64.70% <64.70%> (ø)
...ameworkext/sharedlisterext/nodeinfo_transformer.go 73.07% <73.07%> (ø)
pkg/util/reservation/reservation.go 74.32% <78.26%> (ø)
pkg/scheduler/plugins/reservation/transformer.go 68.64% <80.00%> (ø)
pkg/scheduler/eventhandlers/reservation_handler.go 53.55% <81.25%> (+3.55%) ⬆️
pkg/scheduler/frameworkext/framework_extender.go 87.50% <85.71%> (+29.89%) ⬆️
...heduler/frameworkext/framework_extender_factory.go 86.90% <86.90%> (ø)
pkg/scheduler/plugins/reservation/plugin.go 81.67% <90.90%> (+0.93%) ⬆️
pkg/scheduler/plugins/reservation/rcache.go 89.21% <93.75%> (ø)
...cheduler/plugins/reservation/garbage_collection.go 82.01% <100.00%> (ø)
... and 10 more

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.

Signed-off-by: Joseph <joseph.t.lee@outlook.com>
@hormes
Copy link
Member

hormes commented Mar 3, 2023

The design document needs to be updated. Another picture saves a thousand words, draw a diagram of the internal architecture of the scheduler after expansion?

@eahydra
Copy link
Member Author

eahydra commented Mar 3, 2023

The design document needs to be updated. Another picture saves a thousand words, draw a diagram of the internal architecture of the scheduler after expansion?

Yeah.. Should update the design proposal..I want to update the proposal later when the enhanced implementation of Reservation is almost complete. If need, I also can update the proposal in the PR. WDYT? @hormes

@hormes
Copy link
Member

hormes commented Mar 3, 2023

Or create an issue to track all the changes you mentioned, so that everyone will not miss it

@eahydra
Copy link
Member Author

eahydra commented Mar 3, 2023

Or create an issue to track all the changes you mentioned, so that everyone will not miss it

OKay. #1076

@saintube
Copy link
Member

saintube commented Mar 7, 2023

/lgtm

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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 a8f30e3 into koordinator-sh:main Mar 7, 2023
@zwzhang0107 zwzhang0107 added this to the v1.2 milestone Apr 6, 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.

None yet

5 participants