Skip to content

Commit

Permalink
Do not add a finalizer on triggers without a broker (#880)
Browse files Browse the repository at this point in the history
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
  • Loading branch information
pierDipi committed May 24, 2021
1 parent 3c96727 commit ef24ea0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion control-plane/pkg/reconciler/trigger/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func filterTriggers(lister eventinglisters.BrokerLister) func(interface{}) bool

broker, err := lister.Brokers(trigger.Namespace).Get(trigger.Spec.Broker)
if err != nil {
return true // TODO decide what to do on NotFound/Found
return false
}

value, ok := broker.GetAnnotations()[apiseventing.BrokerClassKey]
Expand Down
2 changes: 1 addition & 1 deletion control-plane/pkg/reconciler/trigger/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ func TestFilterTriggers(t *testing.T) {
},
})

assert.True(t, pass)
assert.False(t, pass)
}

0 comments on commit ef24ea0

Please sign in to comment.