Skip to content

Conversation

vdemeester
Copy link
Member

@vdemeester vdemeester commented Sep 21, 2020

Changes

This make a better use of knative.dev/pkg apis errors package in order
to make the code simpler, and the report better.

  • This allows reporting multiple validation error at once — so, one
    failure message (webhook error) would be more useful to the user.
  • This reduce if err != nil path, simplifying the code.

This commit tackles ClusterTask 🙃

Follows-up #3185

Signed-off-by: Vincent Demeester [email protected]

/cc @sbwsg @pritidesai @bobcatfish @imjasonh @savitaashture

/kind cleanup

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

ClusterTask validation now reports all the error at once, and is a bit more detailed.

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 21, 2020
@imjasonh
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 21, 2020
@vdemeester vdemeester changed the title Enhance v1beta1 validation code for task 🍸 Enhance v1beta1 validation code for clustertask 🍸 Sep 21, 2020
This make a better use of knative.dev/pkg apis errors package in order
to make the code simpler, *and* the report better.

- This allows reporting multiple validation error at once — so, one
  failure message (webhook error) would be more useful to the user.
- This reduce `if err != nil` path, simplifying the code.

This commit tackles `ClusterTask` 🙃

Signed-off-by: Vincent Demeester <[email protected]>
@vdemeester vdemeester force-pushed the enhance-clustertask-validation branch from 941a696 to 3eeebc6 Compare September 21, 2020 14:56
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Sep 21, 2020
@savitaashture
Copy link
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 21, 2020
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Thanks!
/approve

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afrittoli

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 22, 2020
@tekton-robot tekton-robot merged commit de8d72c into tektoncd:master Sep 22, 2020
@vdemeester vdemeester deleted the enhance-clustertask-validation branch September 22, 2020 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants