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: strictly check whether ReservationInfo is available or terminating #1354

Merged

Conversation

eahydra
Copy link
Member

@eahydra eahydra commented Jun 6, 2023

Ⅰ. Describe what this PR does

Users create reused Reservation with finalizer, when need to delete Reservation, users first mark Reservation deleting, and clean other resources, then finally remove the finalizer to release Reservation.

  • If the ReservationInfo (both Reservation CRD object and operating Pod) is terminating, the ReservationInfo cannot be used.
  • In assume stage, if the ReservationInfo in cache is terminating, the assume operation will be rejected.

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

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.

/lgtm

@koordinator-bot koordinator-bot bot added the lgtm label Jun 6, 2023
@eahydra eahydra changed the title koord-scheduler: stricterly check whether ReservationInfo is available koord-scheduler: strictly check whether ReservationInfo is available Jun 6, 2023
@eahydra eahydra force-pushed the skip_deleting_reservation branch from ceef30c to 24c9b01 Compare June 6, 2023 05:18
@koordinator-bot koordinator-bot bot removed the lgtm label Jun 6, 2023
@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Patch coverage: 57.14% and project coverage change: +0.04 🎉

Comparison is base (db67e64) 64.65% compared to head (62b7c95) 64.69%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1354      +/-   ##
==========================================
+ Coverage   64.65%   64.69%   +0.04%     
==========================================
  Files         325      325              
  Lines       33678    33687       +9     
==========================================
+ Hits        21773    21795      +22     
+ Misses      10318    10298      -20     
- Partials     1587     1594       +7     
Flag Coverage Δ
unittests 64.69% <57.14%> (+0.04%) ⬆️

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

Impacted Files Coverage Δ
pkg/scheduler/plugins/reservation/plugin.go 79.93% <42.85%> (-1.16%) ⬇️
pkg/scheduler/plugins/reservation/cache.go 87.14% <50.00%> (-3.97%) ⬇️
pkg/scheduler/frameworkext/reservation_info.go 31.84% <100.00%> (+17.00%) ⬆️
pkg/scheduler/plugins/reservation/transformer.go 68.57% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@eahydra eahydra force-pushed the skip_deleting_reservation branch 2 times, most recently from e8ce3dd to e4e378f Compare June 7, 2023 04:41
@eahydra eahydra changed the title koord-scheduler: strictly check whether ReservationInfo is available koord-scheduler: strictly check whether ReservationInfo is available and terminating Jun 7, 2023
@eahydra eahydra changed the title koord-scheduler: strictly check whether ReservationInfo is available and terminating koord-scheduler: strictly check whether ReservationInfo is terminating Jun 7, 2023
@eahydra eahydra changed the title koord-scheduler: strictly check whether ReservationInfo is terminating koord-scheduler: strictly check whether ReservationInfo is available or terminating Jun 7, 2023
@eahydra eahydra force-pushed the skip_deleting_reservation branch from e4e378f to 4acbbfb Compare June 7, 2023 05:36
Copy link
Member

@jasonliu747 jasonliu747 left a comment

Choose a reason for hiding this comment

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

/lgtm

Signed-off-by: Joseph <joseph.t.lee@outlook.com>
@FillZpp
Copy link
Member

FillZpp commented Jun 7, 2023

/lgtm

@koordinator-bot koordinator-bot bot added the lgtm label Jun 7, 2023
@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FillZpp, hormes, jasonliu747

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 ff48357 into koordinator-sh:main Jun 8, 2023
15 checks passed
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

4 participants