-
Notifications
You must be signed in to change notification settings - Fork 262
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
Record an event and set status message when creation of provisioning request fails #3056
Record an event and set status message when creation of provisioning request fails #3056
Conversation
Skipping CI for Draft Pull Request. |
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
/test all |
/cc @mbobrovskyi @trasc |
/retest-required |
/assign @mbobrovskyi |
d41375e
to
97d43a7
Compare
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.
/lgtm
LGTM label has been added. Git tree hash: 9b930ac0d5e99f8cc024ec26ab7f21b27d4cb5e1
|
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.
LGTM, just a nit
/lgtm Thanks! |
LGTM label has been added. Git tree hash: 1f284b59ee185cb45bd8e18179373bd842fcdd39
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: IrvingMg, mimowo 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 |
@@ -302,6 +303,10 @@ func (c *Controller) syncOwnedProvisionRequest(ctx context.Context, wl *kueue.Wo | |||
} | |||
|
|||
if err := c.client.Create(ctx, req); err != nil { | |||
ac.Message = fmt.Sprintf("Error creating ProvisioningRequest %q: %v", requestName, err) |
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.
@IrvingMg it just occurred to me - could you please follow up to use the TruncateConditionMessage, and TruncateEventMessage helpers to make sure the message is not too long?
It shouldn't be a problem in most cases, but since the message may come from custom webhooks it may be arbitrarily long.
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.
cc @mbobrovskyi
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.
It seems that this is user-facing new feature. Hense, the release note would be helpful.
/release-note-edit
MultiKueue: Record the ProvisioningRequest creation errors to event and ProvisioningRequest status.
/release-note-edit
|
I think we should drop the "MultiKueue: " - this is not used in MultiKueue. In fact, currently ProvisioningRequests and MultiKueue aren't working together. |
Oh, you're right. Let me revise the release-note. |
/release-note-edit
|
/retitle Record an event and set status message when creation of provisioning request fails |
* Record an event when provisioning request fails * Update event reason * Expose ProvReq error as a status * Include error details into status message * Use interceptor funcs for testing * Avoid code duplication for error message
What type of PR is this?
/kind feature
What this PR does / why we need it:
It produces an event when an error during provisioning request creation occurs.
Which issue(s) this PR fixes:
Fixes #3025
Special notes for your reviewer:
Does this PR introduce a user-facing change?