diff --git a/pkg/reconciler/channel/channel.go b/pkg/reconciler/channel/channel.go index c6315a64046..54a91947726 100644 --- a/pkg/reconciler/channel/channel.go +++ b/pkg/reconciler/channel/channel.go @@ -21,7 +21,6 @@ import ( "fmt" "go.uber.org/zap" - corev1 "k8s.io/api/core/v1" apierrs "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -40,12 +39,6 @@ import ( pkgreconciler "knative.dev/pkg/reconciler" ) -// newReconciledNormal makes a new reconciler event with event type Normal, and -// reason ChannelReconciled. -func newReconciledNormal(namespace, name string) pkgreconciler.Event { - return pkgreconciler.NewEvent(corev1.EventTypeNormal, "ChannelReconciled", "Channel reconciled: \"%s/%s\"", namespace, name) -} - type Reconciler struct { // listers index properties about resources channelLister listers.ChannelLister @@ -92,7 +85,7 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, c *v1beta1.Channel) pkgr bCS := r.getChannelableStatus(ctx, &backingChannel.Status, backingChannel.Annotations) c.Status.PropagateStatuses(bCS) - return newReconciledNormal(c.Namespace, c.Name) + return nil } func (r *Reconciler) getChannelableStatus(ctx context.Context, bc *duckv1alpha1.ChannelableCombinedStatus, cAnnotations map[string]string) *duckv1beta1.ChannelableStatus { diff --git a/pkg/reconciler/channel/channel_test.go b/pkg/reconciler/channel/channel_test.go index 2c3d7da0cd9..dc81d841771 100644 --- a/pkg/reconciler/channel/channel_test.go +++ b/pkg/reconciler/channel/channel_test.go @@ -132,9 +132,6 @@ func TestReconcile(t *testing.T) { WithBackingChannelReady, WithChannelAddress(backingChannelHostname)), }}, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "ChannelReconciled", "Channel reconciled: %q", testKey), - }, }, { Name: "Already reconciled", Key: testKey, @@ -154,9 +151,6 @@ func TestReconcile(t *testing.T) { WithInMemoryChannelSubscribers(subscribers()), WithInMemoryChannelAddress(backingChannelHostname)), }, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "ChannelReconciled", "Channel reconciled: %q", testKey), - }, }, { Name: "Backing channel created", Key: testKey, @@ -171,9 +165,6 @@ func TestReconcile(t *testing.T) { WantCreates: []runtime.Object{ createChannel(testNS, channelName, false), }, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "ChannelReconciled", "Channel reconciled: %q", testKey), - }, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: NewChannel(channelName, testNS, WithChannelTemplate(channelCRD()), @@ -213,9 +204,6 @@ func TestReconcile(t *testing.T) { // Updates WithChannelObservedGeneration(42)), }}, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "ChannelReconciled", "Channel reconciled: %q", testKey), - }, }, { Name: "Updating subscribers statuses", Key: testKey, @@ -246,9 +234,6 @@ func TestReconcile(t *testing.T) { WithChannelAddress(backingChannelHostname), WithChannelSubscriberStatuses(subscriberStatuses())), }}, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "ChannelReconciled", "Channel reconciled: %q", testKey), - }, }, { Name: "Updating v1alpha1 channelable subscribers statuses", Key: testKey, @@ -274,9 +259,6 @@ func TestReconcile(t *testing.T) { WithChannelAddress(backingChannelHostname), WithChannelSubscriberStatuses(subscriberStatuses())), }}, - WantEvents: []string{ - Eventf(corev1.EventTypeNormal, "ChannelReconciled", "Channel reconciled: %q", testKey), - }, }} logger := logtesting.TestLogger(t)