Describe the bug
The ChannelSpec and SubscriptionSpec Validate() implementations do not validate the optional DeliverySpec in the same way that the BrokerSpec and TriggerSpec do. I don't know all the history to be able to say whether this is intentional or not but it seems inconsistent.
Aside from the obvious impact of the Webhook not validating the DeliverySpecs, is the side-effect of the experimental-feature flag for the optional timeout field not being respected. It is currently possible to create a Channel or Subscription with a DeliverySpec including the experimental timeout field even though the config-features is configured to disallow the use of this field.
Expected behavior
I would (maybe naively?) expect the Channel and Subscription validation to include the delivery component.
To Reproduce
- Set the
delivery-timeout field in the config-features ConfigMap as disabled
apiVersion: v1
kind: ConfigMap
data:
delivery-timeout: disabled
- Create a Subscription with a
timeout value and verify the Webhook allows it.
apiVersion: messaging.knative.dev/v1
kind: Subscription
spec:
delivery:
timeout: PT90S
* Alternatively, simply provide any "invalid" DeliverySpec config such as an invalid backoffDelay.
Knative release version
main/
Describe the bug
The
ChannelSpecandSubscriptionSpecValidate() implementations do not validate the optionalDeliverySpecin the same way that theBrokerSpecandTriggerSpecdo. I don't know all the history to be able to say whether this is intentional or not but it seems inconsistent.Aside from the obvious impact of the Webhook not validating the DeliverySpecs, is the side-effect of the experimental-feature flag for the optional
timeoutfield not being respected. It is currently possible to create a Channel or Subscription with a DeliverySpec including the experimentaltimeoutfield even though theconfig-featuresis configured to disallow the use of this field.Expected behavior
I would (maybe naively?) expect the Channel and Subscription validation to include the
deliverycomponent.To Reproduce
delivery-timeoutfield in theconfig-featuresConfigMap asdisabledtimeoutvalue and verify the Webhook allows it.* Alternatively, simply provide any "invalid" DeliverySpec config such as an invalid
backoffDelay.Knative release version
main/