Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/core/configmaps/features.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ data:
# For more details: https://github.com/knative/eventing/issues/5593
kreference-mapping: "disabled"

# ALPHA feature: The subscriber-strict flag force subscriptions to define a subscriber
# BETA feature: The subscriber-strict flag force subscriptions to define a subscriber
# For more details: https://github.com/knative/eventing/issues/5756
strict-subscriber: "disabled"
strict-subscriber: "enabled"

# ALPHA feature: The new-trigger-filters flag allows you to use the new `filters` field
# in Trigger objects with its rich filtering capabilities.
Expand Down
6 changes: 2 additions & 4 deletions docs/eventing-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3777,8 +3777,7 @@ knative.dev/pkg/apis/duck/v1.Destination
</em>
</td>
<td>
<em>(Optional)</em>
<p>Subscriber is reference to (optional) function for processing events.
<p>Subscriber is reference to function for processing events.
Events from the Channel will be delivered here and replies are
sent to a Destination as specified by the Reply.</p>
</td>
Expand Down Expand Up @@ -4108,8 +4107,7 @@ knative.dev/pkg/apis/duck/v1.Destination
</em>
</td>
<td>
<em>(Optional)</em>
<p>Subscriber is reference to (optional) function for processing events.
<p>Subscriber is reference to function for processing events.
Events from the Channel will be delivered here and replies are
sent to a Destination as specified by the Reply.</p>
</td>
Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/messaging/v1/subscription_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,9 @@ type SubscriptionSpec struct {
// etc.)
Channel duckv1.KReference `json:"channel"`

// Subscriber is reference to (optional) function for processing events.
// Subscriber is reference to function for processing events.
// Events from the Channel will be delivered here and replies are
// sent to a Destination as specified by the Reply.
// +optional
Subscriber *duckv1.Destination `json:"subscriber,omitempty"`

// Reply specifies (optionally) how to handle events returned from
Expand Down
2 changes: 1 addition & 1 deletion test/experimental/config/features.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ data:
kreference-group: "enabled"
delivery-retryafter: "enabled"
delivery-timeout: "enabled"
strict-subscriber: "disabled"
strict-subscriber: "enabled"
new-trigger-filters: "enabled"
52 changes: 0 additions & 52 deletions test/rekt/channel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,33 +151,6 @@ func TestSmoke_ChannelImplWithSubscription(t *testing.T) {
}
}

/*
TestChannelChainByUsingReplyAsSubscriber tests the following scenario:

EventSource ---> (Channel ---> Subscription) x 10 ---> Sink

It uses Subscription's spec.reply as spec.subscriber.

This test should fail with https://github.com/knative/eventing/issues/5756 done.

*/
func TestChannelChainByUsingReplyAsSubscriber(t *testing.T) {
t.Parallel()

ctx, env := global.Environment(
knative.WithKnativeNamespace(system.Namespace()),
knative.WithLoggingConfig,
knative.WithTracingConfig,
k8s.WithEventListener,
environment.Managed(t),
)

createSubscriberFn := func(ref *duckv1.KReference, uri string) manifest.CfgFn {
return subscription.WithReply(ref, uri)
}
env.Test(ctx, t, channel.ChannelChain(10, createSubscriberFn))
}

/*
TestChannelChain tests the following scenario:

Expand All @@ -201,31 +174,6 @@ func TestChannelChain(t *testing.T) {
env.Test(ctx, t, channel.ChannelChain(10, createSubscriberFn))
}

/*
TestChannelDeadLetterSinkByUsingReplyAsSubscriber tests if the events that cannot be delivered end up in
the dead letter sink.

It uses Subscription's spec.reply as spec.subscriber.

This test should fail with https://github.com/knative/eventing/issues/5756 done.
*/
func TestChannelDeadLetterSinkByUsingReplyAsSubscriber(t *testing.T) {
t.Parallel()

ctx, env := global.Environment(
knative.WithKnativeNamespace(system.Namespace()),
knative.WithLoggingConfig,
knative.WithTracingConfig,
k8s.WithEventListener,
environment.Managed(t),
)

createSubscriberFn := func(ref *duckv1.KReference, uri string) manifest.CfgFn {
return subscription.WithReply(ref, uri)
}
env.Test(ctx, t, channel.DeadLetterSink(createSubscriberFn))
}

/*
TestChannelDeadLetterSink tests if the events that cannot be delivered end up in
the dead letter sink.
Expand Down