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

Use k8s types and validation code with the TriggerResourceTemplate type #422

Merged
merged 3 commits into from
Feb 11, 2020

Conversation

gabemontero
Copy link
Contributor

@gabemontero gabemontero commented Feb 6, 2020

Changes

This PR introduces some k8s alternatives to

I delivered each in their own commit to facilitate the possibility of dropping one, but not both, of these changes.

Submitter Checklist

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

See the contribution guide for more details.

Release Notes

@dibyom @vdemeester @vtereso FYI / PTAL

thanks

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 6, 2020
@tekton-robot tekton-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 6, 2020
@tekton-robot
Copy link

Hi @gabemontero. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@dibyom
Copy link
Member

dibyom commented Feb 6, 2020

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 6, 2020
@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/trigger_template_types.go 90.0% 100.0% 10.0
pkg/apis/triggers/v1alpha1/trigger_template_validation.go 96.8% 97.1% 0.3

@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/trigger_template_types.go 90.0% 100.0% 10.0
pkg/apis/triggers/v1alpha1/trigger_template_validation.go 96.8% 97.1% 0.3

@gabemontero
Copy link
Contributor Author

My initial guesses at filling out the CLA form were unsuccessful. I've sent a query out to the other RH tekton devs to find out what the secret sauce is.

@@ -48,7 +46,7 @@ type TriggerTemplateSpec struct {

// TriggerResourceTemplate describes a resource to create
type TriggerResourceTemplate struct {
json.RawMessage `json:",inline"`
runtime.RawExtension `json:",inline"`
Copy link
Member

Choose a reason for hiding this comment

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

😻

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Feb 7, 2020
@gabemontero
Copy link
Contributor Author

OK I've been added to the RH/Google CLA

@googlebot I signed it!

@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/trigger_template_types.go 90.0% 100.0% 10.0
pkg/apis/triggers/v1alpha1/trigger_template_validation.go 96.8% 97.1% 0.3

@gabemontero
Copy link
Contributor Author

/assign @ncskier

@gabemontero
Copy link
Contributor Author

gabemontero commented Feb 7, 2020

I also have a commit to address the TODO at https://github.com/tektoncd/triggers/blob/master/pkg/apis/triggers/v1alpha1/trigger_template_validation.go#L34 and validate the ObjectMetadata for TriggerTemplate that I can push up if you all would like.

Copy link
Member

@dibyom dibyom left a comment

Choose a reason for hiding this comment

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

This looks good to me! I don't think there should be any user facing changes here at all. Any concerns @wlynch @ncskier ?

@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 Feb 7, 2020
@dibyom
Copy link
Member

dibyom commented Feb 7, 2020

I also have a commit to address the TODO at https://github.com/tektoncd/triggers/blob/master/pkg/apis/triggers/v1alpha1/trigger_template_validation.go#L34 and validate the ObjectMetadata for TriggerTemplate that I can push up if you all would like.

Sure, this or a new PR for that are both fine 😄

@gabemontero
Copy link
Contributor Author

I also have a commit to address the TODO at https://github.com/tektoncd/triggers/blob/master/pkg/apis/triggers/v1alpha1/trigger_template_validation.go#L34 and validate the ObjectMetadata for TriggerTemplate that I can push up if you all would like.

Sure, this or a new PR for that are both fine smile

OK cool ... if anybody else requests changes on the existing stuff I'll push it up with those changes. Otherwise I'll just pull the commit into a new PR.

thanks

@gabemontero
Copy link
Contributor Author

bump @wlynch @ncskier @dibyom

You all happy with the changes?

I do plan on joining the triggers sync call today if discussing this there is warranted in any of your opinions.

@wlynch
Copy link
Member

wlynch commented Feb 11, 2020

/lgtm

This looks great! :D

Thanks for the change!

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 11, 2020
@gabemontero
Copy link
Contributor Author

cool / thanks / glad to help @wlynch

I'll pull in that ObjectMetadata TODO into a new PR.

@tekton-robot tekton-robot merged commit 7b1d5e1 into tektoncd:master Feb 11, 2020
@gabemontero gabemontero deleted the k8s-runtime-raw branch February 11, 2020 14:50
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 lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants