-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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 kubectl create --validate, aggregate errors and handle requir… #10007
improve kubectl create --validate, aggregate errors and handle requir… #10007
Conversation
Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist") If this message is too spammy, please complain to ixdy. |
@satnam6502 @brendandburns @thockin Could you please review this PR? |
@@ -102,11 +109,18 @@ func (s *SwaggerSchema) ValidateObject(obj interface{}, apiVersion, fieldName, t | |||
} | |||
fields, ok := obj.(map[string]interface{}) | |||
if !ok { | |||
return fmt.Errorf("expected object of type map[string]interface{} as value of %s field", fieldName) | |||
return append(allErrs, fmt.Errorf("expected object of type map[string]interface{} as value of %s field", fieldName)) |
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 not report the actual type with %T
?
c0c6070
to
d5fcd9f
Compare
@satnam6502 OK, I changed according to your advice. Could you please review this PR again? |
Please can you add a risk assessment for this PR? And link to a relevant bug? Thanks. |
ok to test |
@k8s-bot ok to test |
GCE e2e build/test failed for commit d5fcd9f. |
Retesting. If this fails again then please can someone investigate? Thanks. |
@feihujiang please can you link this to an issue? |
@k8s-bot ok to test |
GCE e2e build/test failed for commit d5fcd9f. |
@feihujiang please can you look at why e2e fails? |
#10079 @satnam6502 I post a new issues, and link this PR to it. |
@satnam6502 When I opened Jenkins GCE e2e Details, it says "Access not possible". I think I have no right to open the Details now. Could you please post the Jenkins GCE e2e Details for me? Thanks! |
@k8s-bot ok to test |
GCE e2e build/test passed for commit d5fcd9f. |
e2e passes now. Will wait for issue to be triaged to work out milestone. |
Can you copy and paste some sample output? Thanks. |
@satnam6502 OK The Invalid Pod:
kubectl create --validate -f ./v1beta3/invalidCassandra.yaml |
Thank you. |
I will wait for the appropriate TL / meeting to determine the milestone for the associated issue before deciding what to do re: merging. |
improve kubectl create --validate, aggregate errors and handle requir…
improve kubectl create --validate, output aggregated errors and handle required fields