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 arbitration to migration controller #1651

Merged

Conversation

baowj-678
Copy link
Member

Ⅰ. Describe what this PR does

Add the arbitration to migration controller according to #1454.

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

Codecov Report

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

Comparison is base (113d238) 65.82% compared to head (5178116) 66.01%.
Report is 35 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1651      +/-   ##
==========================================
+ Coverage   65.82%   66.01%   +0.19%     
==========================================
  Files         375      385      +10     
  Lines       39549    41569    +2020     
==========================================
+ Hits        26032    27442    +1410     
- Misses      11630    12109     +479     
- Partials     1887     2018     +131     
Flag Coverage Δ
unittests 66.01% <55.27%> (+0.19%) ⬆️

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

Files Coverage Δ
...scheduler/controllers/migration/arbitrator/sort.go 84.15% <ø> (ø)
...kg/descheduler/controllers/migration/controller.go 63.37% <31.57%> (-1.66%) ⬇️
...eduler/controllers/migration/arbitrator/handler.go 65.11% <65.11%> (ø)
...ler/controllers/migration/arbitrator/arbitrator.go 65.80% <40.00%> (-9.70%) ⬇️
...heduler/controllers/migration/arbitrator/filter.go 56.67% <60.76%> (ø)

... and 80 files with indirect coverage changes

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

1.update klog to return;
2.always enable arbitration;

Signed-off-by: baowj <[email protected]>
1.move codes from `migration/filter.go` to `migration/arbitrator/filter.go`

Signed-off-by: baowj <[email protected]>
@koordinator-bot koordinator-bot bot added size/XXL and removed size/L labels Sep 22, 2023
1.remove AnnotationPassedArbitration's deletion.

Signed-off-by: baowj <[email protected]>
@eahydra
Copy link
Member

eahydra commented Sep 22, 2023

@ZiMengSheng PTAL

1.remove lock in migration Reconciler;
2.move codes from migration/filter.go to migration/controller.go;
3.remove some comments;
4.remove explicit initialization of mu in arbitration/filter.go;

Signed-off-by: baowj <[email protected]>
1.make filter a member variable of arbitrator;

Signed-off-by: baowj-678 <[email protected]>
1.add passed arbitration PodMigrationJob record map.

Signed-off-by: baowj-678 <[email protected]>
1.move eventHandler to a single file;
2.rename Add & Delete;
3.use local record PassedArbitration status only;
4.add nonRetryablePodFilter/retryablePodFilter to Filter func.

Signed-off-by: baowj <[email protected]>
1.add pod arbitrating annotation;
2.rename arbitrationHandler variables;
3.update comments;

Signed-off-by: baowj <[email protected]>
1.update PhaseAndAnnotation to expectedPhaseContext;
2.convert Object to PMJ instead using client to get;

Signed-off-by: baowj <[email protected]>
1.rename some variables and structure;

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.

/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

@koordinator-bot koordinator-bot bot merged commit ac77337 into koordinator-sh:main Sep 26, 2023
18 checks passed
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