Skip to content

Channel & Subscription Validation Does Not Include DeliverySpec #5776

@travis-minke-sap

Description

@travis-minke-sap

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

  1. Set the delivery-timeout field in the config-features ConfigMap as disabled
apiVersion: v1
kind: ConfigMap
data:
  delivery-timeout: disabled
  1. 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/

Metadata

Metadata

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions