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-descheduler: add some SortFns for arbitration #1625

Merged
merged 5 commits into from
Sep 11, 2023

Conversation

baowj-678
Copy link
Member

Ⅰ. Describe what this PR does

Some implementations of SortFn according to #1454

  1. NewPodSortFn using sorter.PodSorter() to sort PMJs.
  2. NewJobCreateTimeSortFn sort PMJs according to creation time.
  3. NewJobMigratingSortFn sort PMJs according to if there are some migrating pods in the same job.
  4. NewJobGatherSortFn gathers PMJs in the same job.

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

Codecov Report

Patch coverage: 79.43% and project coverage change: +0.52% 🎉

Comparison is base (52f57b6) 65.29% compared to head (f9a188f) 65.82%.
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1625      +/-   ##
==========================================
+ Coverage   65.29%   65.82%   +0.52%     
==========================================
  Files         369      374       +5     
  Lines       38117    39484    +1367     
==========================================
+ Hits        24889    25990    +1101     
- Misses      11404    11607     +203     
- Partials     1824     1887      +63     
Flag Coverage Δ
unittests 65.82% <79.43%> (+0.52%) ⬆️

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

Files Changed Coverage Δ
...ler/controllers/migration/arbitrator/arbitrator.go 75.49% <0.00%> (-2.59%) ⬇️
...scheduler/controllers/migration/arbitrator/sort.go 84.15% <84.15%> (ø)

... and 54 files with indirect coverage changes

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

1.add func getMigratingJobNum
2.simplify func SortJobsByMigratingNum
3.add test cases

Signed-off-by: baowj <[email protected]>
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.

As we discussed, we can optimize the sorters. @baowj-678 please submit new PR to do the optimization.
/lgtm
/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eahydra

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

@eahydra eahydra changed the title koord-descheduler: add some SortFns koord-descheduler: add some SortFns for abitration Sep 11, 2023
@eahydra eahydra changed the title koord-descheduler: add some SortFns for abitration koord-descheduler: add some SortFns for arbitration Sep 11, 2023
@koordinator-bot koordinator-bot bot merged commit 05afefa into koordinator-sh:main Sep 11, 2023
j4ckstraw pushed a commit to j4ckstraw/koordinator that referenced this pull request May 20, 2024
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.

2 participants