-
Notifications
You must be signed in to change notification settings - Fork 222
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
Provide support for ProvisioningRequest's BookingExpired condition #2445
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
/assign @yaroslava-serdiuk |
please, fix the tests |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: PBundyra The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few nits
/lgtm
if isFailed(oldPr) { | ||
switch { | ||
case isFailed(oldPr) || isBookingExpired(oldPr): | ||
if isBookingExpired(oldPr) && workload.IsAdmitted(wl) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If ProvReq is failed but workload.IsAdmitted(wl)
are we going to retry? Maybe we can put caseworkload.IsAdmitted(wl)
and break earlier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC ProvReq cannot transition from Provisioned
to Failed
. In that case, Workload cannot be admitted and have ProvReq Failed
, as Workload is only admitted if all of its checks are Ready
, and ProvReq sets AdmissionChecks as Ready
only when it's Provisioned
LGTM label has been added. Git tree hash: 672b58a98791f6ae8859027913fbce4da7767f21
|
10ab30a
to
a4ef4c7
Compare
/lgtm |
LGTM label has been added. Git tree hash: db579ea45ac6d17bbcd2a970814e4e724cd4c40b
|
/lgtm |
// This is needed to prevent replacement pods being stuck in the pending phase indefinitely | ||
// as the nodes are already deleted by Cluster Autoscaler. | ||
updated = updateCheckState(&checkState, kueue.CheckStateRejected) || updated | ||
updated = updateCheckMessage(&checkState, apimeta.FindStatusCondition(pr.Status.Conditions, autoscaling.CapacityRevoked).Message) || updated | ||
} | ||
case isBookingExpired(pr): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the logic mostly repeated in two places? Perhaps we need some refactoring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean similarities between Failed and BookingExpired cases?
New changes are detected. LGTM label has been removed. |
e41ca2a
to
2345c81
Compare
/retest |
3b3727f
to
d6b5169
Compare
d6b5169
to
2142af2
Compare
What type of PR is this?
/kind feature
What this PR does / why we need it:
Provide support for the new ProvisioningRequest's condition
BookingExpired
. When a Workload is Admitted this Condition has no effect. If Workload is still waiting for admission due to others AdmissionChecks running, then with respect to retry policy it, the Provisioning AdmissionCheck gets retried or rejected.Which issue(s) this PR fixes:
Fixes #2041
Special notes for your reviewer:
Does this PR introduce a user-facing change?