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

Record an event when provisioning request fails #3056

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

IrvingMg
Copy link
Contributor

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?

NONE

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. labels Sep 16, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: IrvingMg
Once this PR has been reviewed and has the lgtm label, please assign kerthcet for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 16, 2024
Copy link

netlify bot commented Sep 16, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit d41375e
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/66f5b0f0c431090008edebef

@IrvingMg
Copy link
Contributor Author

/test all

@IrvingMg
Copy link
Contributor Author

/cc @mbobrovskyi @trasc

@IrvingMg IrvingMg marked this pull request as ready for review September 17, 2024 07:31
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 17, 2024
@IrvingMg
Copy link
Contributor Author

/retest-required

@@ -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", requestName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you include some information about what is the problem in the message?

@tenzen-y
Copy link
Member

tenzen-y commented Oct 1, 2024

/assign @mbobrovskyi

Comment on lines +45 to +60
type fakeControllerRuntimeClient struct {
client.Client
err error
}

func (c *fakeControllerRuntimeClient) WithError(err error) {
c.err = err
}

func (c *fakeControllerRuntimeClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error {
if c.err != nil {
return c.err
}

return c.Client.Create(ctx, obj, opts...)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use builder.WithInterceptorFuncs(...) instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Surface errors when a PodTemplate or a ProvReq is invalid
7 participants