tektoncd / triggers

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

Fix k8s Events generation #1603

Closed khrm closed 1 year ago

khrm commented 1 year ago

After pr #1584, k8s events is not coming. This fixes that by adding v1beta1 and v1alpha1 apis to scheme.

Changes

Submitter Checklist

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

Release Notes

NONE
tekton-robot commented 1 year 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% 22.6% -0.8
khrm commented 1 year ago

/test tekton-triggers-unit-tests

khrm commented 1 year ago

@dibyom There's a bug in sending k8s events but I don't have any idea why were are encountering it now after merging #1584 .

khrm commented 1 year ago

Fixes #1602

savitaashture commented 1 year ago

Tested with the fix I see events are coming

$ oc get events | grep "dev.tekton.event.triggers"  -w
3s          Normal    dev.tekton.event.triggers.started.v1      eventlistener/github-listener           
3s          Normal    dev.tekton.event.triggers.done.v1         eventlistener/github-listener           
3s          Normal    dev.tekton.event.triggers.successful.v1   eventlistener/github-listener
tekton-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: savitaashture

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)~~ [savitaashture] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
khrm commented 1 year ago

/cherry-pick release-0.24.x

tekton-robot commented 1 year ago

@khrm: once the present PR merges, I will cherry-pick it on top of release-0.24.x in a new PR and assign it to you.

In response to [this](https://github.com/tektoncd/triggers/pull/1603#issuecomment-1578144362): > >/cherry-pick release-0.24.x > > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
tekton-robot commented 1 year ago

@khrm: cannot checkout release-0.24.x: error checking out release-0.24.x: exit status 1. output: error: pathspec 'release-0.24.x' did not match any file(s) known to git

In response to [this](https://github.com/tektoncd/triggers/pull/1603#issuecomment-1578144362): > >/cherry-pick release-0.24.x > > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
khrm commented 1 year ago

/cherry-pick release-v0.24.x

tekton-robot commented 1 year ago

@khrm: new pull request created: #1604

In response to [this](https://github.com/tektoncd/triggers/pull/1603#issuecomment-1578154590): >/cherry-pick release-v0.24.x Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
ileixe commented 1 year ago

We spent a whole day to bisect this bug right after cluster upgrade via tekton operator. It would be better to call out the packaging side as it's still deployable for many users.

By the way, how the scheme addition solve this problem? (Out of curiousity)