-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Improve consistency of errors returned from core webhooks #6249
Comments
@killianmuldoon: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There's also a number of webhooks outside the core package we could address in similar work if anyone is interested in those specifically. Those are:
In ControlPlane
In experimental
In CAPD
|
/kind cleanup |
Hey @killianmuldoon I'd be happy to help out with any of the webhooks. Are there any ones in particular you think would be easier to start with? |
Thanks @Jont828 I think Machine or MachineSet are both pretty straightforward if you'd like to take one of them on. |
Sounds good, I'll take a look at Machines to start. To clarify, do we want to include CAPD Machines in this change, and also is #6129 a good example to follow? |
Hey @killianmuldoon, |
Sure @sachinkumarsingh092 Thanks for your interest in this /assign sachinkumarsingh092 |
Hi @killianmuldoon I would like to work on |
@killianmuldoon Could you assign me the MachineHealthCheck one as well? |
Sure thing - thanks @Jont828 |
/reopen |
@sbueringer: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/close |
@killianmuldoon: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The use of field errors (from k8s.io/apimachinery/pkg/util/validation/field) is common across the webhooks in Cluster API, but which errors are used and the messages that accompany them should be made more consistent. It would be great to get some help in reviewing how these are applied in different webhooks to bring them all in line with a single standard.
Core Cluster API currently has the following webhooks:
There's three parts to this task for each webhook.
1. Use the correct type of error
Our current usage should be roughly as follows:
There are other fieldErrors available, but I think it's better to keep the focus tight and include more information on specific validation failures in messages.
2. Use the full path to spec
3. Make message content and format consistent
Messages text in our field errors should follow some standards:
If you'd like to help please comment below with the name of the webhook you'd like to take on and I'll assign it in the issue here. If you've got any questions I'm happy to walk through what needs to be done here.
/help
The text was updated successfully, but these errors were encountered: