Closed Harwayne closed 3 years ago
Having played with the PubSub API, it seems that the API doesn't support retry number without a DLQ, so our API shouldn't allow it either.
The webhook must reject requests that (after defaulting) have a non-nil spec.delivery.retry
and a nil spec.delivery.deadLetterSink
.
Describe the bug Broker ignores spec.delivery.retry if spec.delivery.deadLetterSink is nil.
Expected behavior Either the Broker is rejected by the webhook as having an invalid deliverySpec, or retries is respected.
To Reproduce With the default
config-br-delivery
, createObserve that the GCP PubSub Subscription created does not have the retry number anywhere:
This is the only place that the
retry
value is read, and it is ignored ifdeadLetterSink
is nil. https://github.com/google/knative-gcp/blob/87b9a08562d4019eb35522b616b67a0fbe0b9ed0/pkg/reconciler/trigger/trigger.go#L313-L321