-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add user-friendly validation of builder/artifact compatibility #4312
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
Add user-friendly validation of builder/artifact compatibility #4312
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4312 +/- ##
==========================================
+ Coverage 71.96% 72.00% +0.04%
==========================================
Files 323 324 +1
Lines 12370 12404 +34
==========================================
+ Hits 8902 8932 +30
- Misses 2904 2905 +1
- Partials 564 567 +3
Continue to review full report at Codecov.
|
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.
Would it make sense to move this validation to validation.Process()
?
@dgageot - That seems reasonable. I wasn't aware of the validation package function before, but I could easily move the user-friendly error message there, and leave the internal error where it is now. |
@tstromberg I think that would make sense |
Done. Please take another look. |
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.
nice, these error messages are way better. small nits but otherwise LGTM
Fixes #4161
Example case
If
cluster
is removed fromexamples/kaniko/skaffold.yaml
, andskaffold build
is run.Old error message
couldn't build "skaffold-example": undefined artifact type: {DockerArtifact:<nil> BazelArtifact:<nil> JibArtifact:<nil> KanikoArtifact:0xc000542be0 BuildpackArtifact:<nil> CustomArtifact:<nil>}
New error message