⚠️ Fakeclient: reject create/update if Name isn't provided#886
⚠️ Fakeclient: reject create/update if Name isn't provided#886k8s-ci-robot merged 1 commit intokubernetes-sigs:masterfrom
Conversation
|
Hi @GrigoriyMikhalkin. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
Thanks! Could you change the title prefix to |
Done |
| if err != nil { | ||
| return err | ||
| } | ||
| if accessor.GetName() == "" { |
There was a problem hiding this comment.
This needs to be a NewInvalid, this is how that looks like from a real api server:
ErrStatus: {
TypeMeta: {Kind: "", APIVersion: ""},
ListMeta: {
SelfLink: "",
ResourceVersion: "",
Continue: "",
RemainingItemCount: nil,
},
Status: "Failure",
Message: "ConfigMap \"\" is invalid: metadata.name: Required value: name or generateName is required",
Reason: "Invalid",
Details: {
Name: "",
Group: "",
Kind: "ConfigMap",
UID: "",
Causes: [
{
Type: "FieldValueRequired",
Message: "Required value: name or generateName is required",
Field: "metadata.name",
},
],
RetryAfterSeconds: 0,
},
Code: 422,
}
c73cecf to
e99a0ae
Compare
|
/assign @vincepri |
|
/ok-to-test |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: GrigoriyMikhalkin, vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #838