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: set Reservation indexer before informer start to avoid error #996

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

tzzcfrank
Copy link
Contributor

@tzzcfrank tzzcfrank commented Feb 8, 2023

Ⅰ. Describe what this PR does

If there is a new plugin that also starts the reservation informer during initialization, it will cause the reservation plugin to fail to register the indexer internally. The reason is that the k8s scheduling framework does not guarantee that the plugins are initialized in the order of configuration, even if the reservation plugin is configured first.

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

Codecov Report

Base: 67.59% // Head: 67.52% // Decreases project coverage by -0.08% ⚠️

Coverage data is based on head (1ce2c14) compared to base (2b0f745).
Patch coverage: 39.47% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #996      +/-   ##
==========================================
- Coverage   67.59%   67.52%   -0.08%     
==========================================
  Files         247      249       +2     
  Lines       28174    28190      +16     
==========================================
- Hits        19043    19034       -9     
- Misses       7829     7851      +22     
- Partials     1302     1305       +3     
Flag Coverage Δ
unittests 67.52% <39.47%> (-0.08%) ⬇️

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

Impacted Files Coverage Δ
pkg/scheduler/frameworkext/indexer/add_indexer.go 0.00% <0.00%> (ø)
pkg/scheduler/plugins/reservation/plugin.go 80.73% <ø> (+0.29%) ⬆️
pkg/scheduler/plugins/reservation/utils.go 78.57% <ø> (-0.71%) ⬇️
pkg/scheduler/frameworkext/framework_extender.go 57.60% <40.00%> (-1.42%) ⬇️
pkg/scheduler/plugins/reservation/hook.go 75.62% <50.00%> (ø)
pkg/scheduler/frameworkext/indexer/reservation.go 52.38% <52.38%> (ø)
...cheduler/plugins/reservation/garbage_collection.go 82.01% <100.00%> (ø)
pkg/koordlet/runtimehooks/reconciler/reconciler.go 61.76% <0.00%> (-4.12%) ⬇️
pkg/util/httputil/reverseproxy.go 85.10% <0.00%> (+0.26%) ⬆️

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.

@eahydra eahydra requested a review from saintube February 8, 2023 14:24
@eahydra eahydra changed the title koord-scheduler: fix bug, avoid adding indexer after informer started koord-scheduler: set Reservation indexer before informer start to avoid error Feb 8, 2023
@tzzcfrank tzzcfrank force-pushed the informer_start branch 2 times, most recently from 53c5123 to a2d2113 Compare February 8, 2023 16:52
…id error

Signed-off-by: tzzcfrank <tzzcfrank@users.noreply.github.com>
@saintube
Copy link
Member

saintube commented Feb 9, 2023

/lgtm

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

Copy link
Member

@FillZpp FillZpp left a comment

Choose a reason for hiding this comment

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

Thanks!

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eahydra, FillZpp

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 d25c4cd into koordinator-sh:main Feb 9, 2023
@tzzcfrank tzzcfrank deleted the informer_start branch February 9, 2023 02:45
@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