Closed FWiesner closed 4 years ago
time.ParseDuration()
uses a custom format, not RFC3339 and time.Parse(...)
parses timestamps. You might need https://github.com/peterhellberg/duration/blob/master/duration.go or similar
@lionelvillard What was the intent for valid values for this field?
The intent is to use the ISO8601 duration format which is not covered by RFC3339 (only mentioned in the Appendix A).
We need to fix our doc and implementation.
Thanks @FWiesner for reporting this!
btw what is the default value?
AFAIK, there is no channel implementations supporting retries and there is no predefined default values.
@lionelvillard I've heard repeatedly the KafkaChannel
would
Seems like in golang stdlib there is no way to define the format to parse a duration... https://github.com/knative/eventing/issues/3555
/assign
There is this library https://github.com/senseyeio/duration/blob/master/duration.go which implements this library but then uses its own Duration
type more than the one in the stdlib. We might take inspiration for the parsing part, but then use the golang stdlib type... wdyt @pierDipi ?
This lib seems maintained https://github.com/rickb777/date (latest release 4 days ago), and also, it supports converting the parsed duration to the standard time.Duration
.
cool, then sgtm!
https://github.com/knative/eventing/blob/a6b7494a5b8fbb2e9574dfbe54fbb9dad53ad121/pkg/apis/duck/v1/delivery_types.go#L70
It was possible to set
2019-10-12T07:20:50.52Z
as value, but notP1S