tektoncd / triggers

Event triggering with Tekton!
Apache License 2.0
545 stars 416 forks source link

Remove tekton resource validation #1699

Closed GijsvanDulmen closed 3 months ago

GijsvanDulmen commented 4 months ago

Changes

Makes it possible to create other resources in the trigger template besides Tekton resources. Solves https://github.com/tektoncd/triggers/issues/1696

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

Release Notes

Removes the limit of only creating Tekton resources from within your TriggerTemplate. This will allow for other K8s resources to be created as well like for example K8s Jobs.
tekton-robot commented 4 months ago

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

GijsvanDulmen commented 4 months ago

/test all

tekton-robot commented 4 months ago

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/v1beta1/trigger_template_validation.go 97.1% 96.6% -0.5
GijsvanDulmen commented 4 months ago

/test tekton-triggers-unit-tests

dibyom commented 4 months ago

/retest

tekton-robot commented 4 months ago

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/adapter/adapter.go 23.5% 23.2% -0.3
pkg/apis/triggers/v1beta1/trigger_template_validation.go 97.1% 96.6% -0.5
dibyom commented 4 months ago

looks like the builds tests are failing due to goimports:

pkg/apis/triggers/v1alpha1/trigger_template_validation.go:21: File is not `goimports`-ed (goimports)
    "fmt"
pkg/apis/triggers/v1beta1/trigger_template_validation.go:21: File is not `goimports`-ed (goimports)
    "fmt"
dibyom commented 4 months ago

/test pull-tekton-triggers-integration-tests

GijsvanDulmen commented 4 months ago

/retest

tekton-robot commented 4 months ago

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/adapter/adapter.go 23.5% 23.2% -0.3
pkg/apis/triggers/v1beta1/trigger_template_validation.go 97.1% 96.6% -0.5
tekton-robot commented 4 months ago

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/adapter/adapter.go 23.5% 23.2% -0.3
pkg/apis/triggers/v1beta1/trigger_template_validation.go 97.1% 96.6% -0.5
GijsvanDulmen commented 4 months ago

/retest-required

tekton-robot commented 4 months ago

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/adapter/adapter.go 23.5% 23.2% -0.3
pkg/apis/triggers/v1beta1/trigger_template_validation.go 97.1% 96.6% -0.5
tekton-robot commented 4 months ago

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/adapter/adapter.go 23.5% 23.2% -0.3
pkg/apis/triggers/v1beta1/trigger_template_validation.go 97.1% 96.6% -0.5
tekton-robot commented 4 months ago

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/adapter/adapter.go 23.5% 23.2% -0.3
pkg/apis/triggers/v1beta1/trigger_template_validation.go 97.1% 96.6% -0.5
tekton-robot commented 4 months ago

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/adapter/adapter.go 23.5% 23.2% -0.3
pkg/apis/triggers/v1beta1/trigger_template_validation.go 97.1% 96.6% -0.5
GijsvanDulmen commented 4 months ago

/kind feature

GijsvanDulmen commented 4 months ago
Removes the limit of only creating Tekton resources from within your TriggerTemplate. This will allow for other K8s resources to be created as well like for example K8s Jobs.
tekton-robot commented 4 months ago

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/adapter/adapter.go 23.5% 23.2% -0.3
pkg/apis/triggers/v1beta1/trigger_template_validation.go 97.1% 96.6% -0.5
GijsvanDulmen commented 4 months ago

@dibyom Thanks for the review! Will process those asap :-)

tekton-robot commented 4 months ago

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
cmd/triggerrun/cmd/root.go 45.2% 45.5% 0.4
pkg/adapter/adapter.go 23.5% 23.2% -0.3
pkg/apis/triggers/v1beta1/trigger_template_validation.go 97.1% 96.6% -0.5
GijsvanDulmen commented 4 months ago

@dibyom It's ready for another review.

tekton-robot commented 4 months ago

[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: - ~~[OWNERS](https://github.com/tektoncd/triggers/blob/main/OWNERS)~~ [dibyom] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
dibyom commented 4 months ago

Also cc @khrm @savitaashture if you'd like to take a look

tekton-robot commented 4 months ago

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
cmd/triggerrun/cmd/root.go 45.2% 45.5% 0.4
pkg/adapter/adapter.go 23.5% 23.2% -0.3
pkg/apis/triggers/v1beta1/trigger_template_validation.go 97.1% 96.6% -0.5
dibyom commented 4 months ago

@savitaashture @khrm any objections to merging this?

khrm commented 4 months ago

Would take a look tomorrow.

tekton-robot commented 4 months ago

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
cmd/triggerrun/cmd/root.go 45.2% 45.5% 0.4
pkg/adapter/adapter.go 23.5% 23.2% -0.3
pkg/apis/triggers/v1beta1/trigger_template_validation.go 97.1% 96.6% -0.5
khrm commented 3 months ago

Everything looks fine. Let's merge this.