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 TriggerCRD object validation and default #738

Merged
merged 1 commit into from
Sep 8, 2020

Conversation

khrm
Copy link
Contributor

@khrm khrm commented Sep 2, 2020

Defaults and Validation for TriggerCRD object have been added

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

@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 2, 2020
@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/trigger_defaults.go Do not exist 100.0%
pkg/apis/triggers/v1alpha1/trigger_validation.go Do not exist 89.5%

Copy link
Contributor

@savitaashture savitaashture left a comment

Choose a reason for hiding this comment

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

I see code duplication for defaults and validator between eventlistener and triggers

Can we somehow avoid code duplication by writing common function and calling from both the place?

pkg/apis/triggers/v1alpha1/trigger_defaults.go Outdated Show resolved Hide resolved
@khrm
Copy link
Contributor Author

khrm commented Sep 3, 2020

/kind misc

@tekton-robot tekton-robot added the kind/misc Categorizes issue or PR as a miscellaneuous one. label Sep 3, 2020
@dibyom dibyom added this to the Triggers v0.8.0 milestone Sep 3, 2020
@dibyom
Copy link
Member

dibyom commented Sep 3, 2020

I'd mark this as kind/feature since we are adding something that a user can use i.e extra validation/defaults.

@khrm khrm added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/misc Categorizes issue or PR as a miscellaneuous one. labels Sep 6, 2020
@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/trigger_defaults.go Do not exist 100.0%
pkg/apis/triggers/v1alpha1/trigger_validation.go Do not exist 89.5%

@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/trigger_defaults.go Do not exist 100.0%
pkg/apis/triggers/v1alpha1/trigger_validation.go Do not exist 89.5%

@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 93.4% 100.0% 6.6
pkg/apis/triggers/v1alpha1/trigger_defaults.go Do not exist 100.0%
pkg/apis/triggers/v1alpha1/trigger_validation.go Do not exist 88.5%

@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 93.4% 100.0% 6.6
pkg/apis/triggers/v1alpha1/trigger_defaults.go Do not exist 100.0%
pkg/apis/triggers/v1alpha1/trigger_validation.go Do not exist 88.5%

@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 93.2% 100.0% 6.8
pkg/apis/triggers/v1alpha1/trigger_defaults.go Do not exist 100.0%
pkg/apis/triggers/v1alpha1/trigger_validation.go Do not exist 88.5%

@khrm khrm force-pushed the TriggerDefault branch 3 times, most recently from 5618e95 to 59b3bbb Compare September 8, 2020 08:22
@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 93.2% 100.0% 6.8
pkg/apis/triggers/v1alpha1/trigger_defaults.go Do not exist 100.0%
pkg/apis/triggers/v1alpha1/trigger_validation.go Do not exist 91.5%

@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 93.2% 100.0% 6.8
pkg/apis/triggers/v1alpha1/trigger_defaults.go Do not exist 100.0%
pkg/apis/triggers/v1alpha1/trigger_validation.go Do not exist 91.2%

Defaults and Validation for TriggerCRD object have been added.
@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 93.2% 100.0% 6.8
pkg/apis/triggers/v1alpha1/trigger_defaults.go Do not exist 100.0%
pkg/apis/triggers/v1alpha1/trigger_validation.go Do not exist 91.2%

@dibyom
Copy link
Member

dibyom commented Sep 8, 2020

/approve
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 8, 2020
@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 Sep 8, 2020
@tekton-robot tekton-robot merged commit 19e0cd2 into tektoncd:master Sep 8, 2020
@khrm khrm deleted the TriggerDefault branch July 28, 2021 14:26
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/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants