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

Expose assignReplicas and selectClusters function to external schedulers #4293

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

chaosi-zju
Copy link
Member

@chaosi-zju chaosi-zju commented Nov 21, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

Expose assignReplicas and selectClusters function to external schedulers

Which issue(s) this PR fixes:

Fixes #4279

Special notes for your reviewer:

@wangyang0616

Does this PR introduce a user-facing change?:

none

@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 21, 2023
@karmada-bot karmada-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 21, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2023

Codecov Report

Attention: 34 lines in your changes are missing coverage. Please review.

Comparison is base (bf1098b) 52.80% compared to head (bd46fcd) 52.78%.
Report is 4 commits behind head on master.

Files Patch % Lines
pkg/scheduler/core/common.go 0.00% 31 Missing ⚠️
pkg/scheduler/core/generic_scheduler.go 0.00% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4293      +/-   ##
==========================================
- Coverage   52.80%   52.78%   -0.03%     
==========================================
  Files         240      241       +1     
  Lines       23624    23628       +4     
==========================================
- Hits        12474    12471       -3     
- Misses      10471    10477       +6     
- Partials      679      680       +1     
Flag Coverage Δ
unittests 52.78% <0.00%> (-0.03%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jwcesign jwcesign left a comment

Choose a reason for hiding this comment

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

/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 21, 2023
@XiShanYongYe-Chang
Copy link
Member

Is it sufficient to only export this method based on the description of the issue?

@karmada-bot karmada-bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 21, 2023
@karmada-bot karmada-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 21, 2023
@chaosi-zju chaosi-zju changed the title Expose assignReplicas function to external schedulers Expose assignReplicas and selectClusters function to external schedulers Nov 21, 2023
@chaosi-zju
Copy link
Member Author

Is it sufficient to only export this method based on the description of the issue?

They just need assignReplicas and selectClusters, they are not concerned with the implementation details of these two functions, they just want to import what we updated.

@chaosi-zju chaosi-zju force-pushed the feat-schedule branch 3 times, most recently from 89a4ed1 to efc2757 Compare November 22, 2023 01:50
@karmada-bot karmada-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 22, 2023
Copy link
Member

@whitewindmills whitewindmills left a comment

Choose a reason for hiding this comment

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

I don't know if these two exposed functions meet your requirements. @wangyang0616

@karmada-bot karmada-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 22, 2023
@RainbowMango
Copy link
Member

Please rebase this as we just introduced license check by #4204. A license header is required now for each Go file.

@wangyang0616
Copy link

I don't know if these two exposed functions meet your requirements. @wangyang0616

The current pr can help us complete the reference of the scheduling policy. Thanks.

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 22, 2023
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2023
@karmada-bot karmada-bot merged commit 0907394 into karmada-io:master Nov 22, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

External schedulers can directly reference Karmada’s existing scheduling capabilities
8 participants