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

scheduler: revise reservation and add preallocation api #2329

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

saintube
Copy link
Member

@saintube saintube commented Feb 7, 2025

Ⅰ. Describe what this PR does

  1. Add PreAllocation API.
  2. Revise the logic of the reservation plugin for readability and efficiency.
  3. Add the feature SyncReservationDeletion to sync the reservation-allocated annotation of owner pods when a reservation is deleted. It is safe to get backward compatible when the feature is disabled.

Ⅱ. Does this pull request fix one issue?

Part of #2150.

Ⅲ. 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

@saintube saintube force-pushed the scheduler-reservation-preallocation branch from 87b2422 to 2a39ee0 Compare February 7, 2025 06:35
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 58.70021% with 197 lines in your changes missing coverage. Please review.

Project coverage is 65.93%. Comparing base (af357ca) to head (767e9c4).

Files with missing lines Patch % Lines
...plugins/reservation/controller/pod_eventhandler.go 63.55% 39 Missing and 4 partials ⚠️
...scheduler/plugins/reservation/reservation_state.go 18.75% 38 Missing and 1 partial ⚠️
pkg/scheduler/plugins/reservation/cache.go 64.36% 27 Missing and 4 partials ⚠️
...duler/plugins/reservation/controller/controller.go 61.42% 19 Missing and 8 partials ⚠️
.../frameworkext/eventhandlers/reservation_handler.go 46.66% 15 Missing and 1 partial ⚠️
pkg/scheduler/plugins/reservation/transformer.go 69.76% 7 Missing and 6 partials ⚠️
pkg/scheduler/frameworkext/reservation_info.go 0.00% 8 Missing ⚠️
...reservation/controller/reservation_eventhandler.go 61.53% 4 Missing and 1 partial ⚠️
pkg/scheduler/plugins/reservation/nominator.go 75.00% 4 Missing and 1 partial ⚠️
pkg/util/reservation/reservation.go 16.66% 4 Missing and 1 partial ⚠️
... and 2 more

❌ Your patch check has failed because the patch coverage (58.70%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2329      +/-   ##
==========================================
- Coverage   65.94%   65.93%   -0.02%     
==========================================
  Files         466      467       +1     
  Lines       54879    55109     +230     
==========================================
+ Hits        36191    36334     +143     
- Misses      16074    16151      +77     
- Partials     2614     2624      +10     
Flag Coverage Δ
unittests 65.93% <58.70%> (-0.02%) ⬇️

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.

@saintube saintube force-pushed the scheduler-reservation-preallocation branch 2 times, most recently from 95a336d to ed3b62e Compare February 10, 2025 12:57
@saintube saintube force-pushed the scheduler-reservation-preallocation branch 2 times, most recently from 38e8ceb to 842b228 Compare February 19, 2025 03:20
@saintube saintube force-pushed the scheduler-reservation-preallocation branch from 842b228 to 767e9c4 Compare February 19, 2025 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant