Skip to content
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 Condition type to webhook and SchemeBuilder #1130

Merged
merged 1 commit into from
Jul 26, 2019

Conversation

dibyom
Copy link
Member

@dibyom dibyom commented Jul 26, 2019

Changes

To enable webhook validation, Condition has to implement the
Defaultable interface even though at the moment there are no
default values.
Also, found that we need to register new types to the SchemeBuilder else
if we cannot create Conditions using the generated client (e.g. for e2e
tests) since the Kind is not properly set.

Both of these changes should have been a part of the APIs PR for
Conditions. I have an upcoming PR that will update docs for creating new
types with this information.

Submitter Checklist

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

@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Jul 26, 2019
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 26, 2019
To enable webhook validation, Condition has to implement the
`Defaultable` interface even though at the moment there are no
default values.
Also, found that we need to register new types to the SchemeBuilder else
if we cannot create Conditions using the generated client (e.g. for e2e
 tests) since the Kind is not properly set.

Both of these changes should have been a part of the APIs PR for
Conditions. I will have an upcoming PR that will update docs for creating new
types with this information.

Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/condition_defaults.go Do not exist 0.0%

@tekton-robot
Copy link
Collaborator

The following is the coverage report on pkg/.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha1/condition_defaults.go Do not exist 0.0%

Copy link
Collaborator

@bobcatfish bobcatfish left a comment

Choose a reason for hiding this comment

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

Thanks for catching and fixing this!! ❤️

I have an upcoming PR that will update docs for creating new types with this information.

Sounds great - I had no idea!!!

/lgtm
/approve
/meow space

@@ -48,6 +48,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Task{},
&TaskList{},
&Condition{},
&ConditionList{},
Copy link
Collaborator

Choose a reason for hiding this comment

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

whoa i never would have known to do this!

Copy link
Member Author

Choose a reason for hiding this comment

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

Found out the hard way while writing an e2e test 😅

@tekton-robot
Copy link
Collaborator

@bobcatfish: cat image

In response to this:

Thanks for catching and fixing this!! ❤️

I have an upcoming PR that will update docs for creating new types with this information.

Sounds great - I had no idea!!!

/lgtm
/approve
/meow space

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.

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 26, 2019
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bobcatfish, dibyom

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 Jul 26, 2019
@tekton-robot tekton-robot merged commit 5741840 into tektoncd:master Jul 26, 2019
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. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants